Skip to content

Commit

Permalink
commit: Restore --edit when combined with --fixup
Browse files Browse the repository at this point in the history
Recent changes to --fixup, adding amend suboption, caused the
--edit flag to be ignored as use_editor was always set to zero.

Restore edit_flag having higher priority than fixup_message when
deciding the value of use_editor by only changing the default
if edit_flag is not set.

Signed-off-by: Joel Klinghed <the_jk@spawned.biz>
  • Loading branch information
thejk committed Aug 11, 2021
1 parent ebf3c04 commit 6ad4b46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtin/commit.c
Expand Up @@ -1333,7 +1333,8 @@ static int parse_and_validate_options(int argc, const char *argv[],
} else {
fixup_commit = fixup_message;
fixup_prefix = "fixup";
use_editor = 0;
if (0 > edit_flag)
use_editor = 0;
}
}

Expand Down

0 comments on commit 6ad4b46

Please sign in to comment.