diff options
author | Joel Klinghed <the_jk@spawned.biz> | 2021-08-14 21:40:30 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-15 09:44:08 -0700 |
commit | 8ef6aad664715c16caf6e36a7f6b174a06574477 (patch) | |
tree | 96e439d18259f1fcc2262478b9b5a7c3113b4231 /builtin/commit.c | |
parent | Git 2.33-rc2 (diff) | |
download | tgif-8ef6aad664715c16caf6e36a7f6b174a06574477.tar.xz |
commit: restore --edit when combined with --fixup
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 moving the edit flag condition
later in the method.
Signed-off-by: Joel Klinghed <the_jk@spawned.biz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
-rw-r--r-- | builtin/commit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index 243c626307..7c9b1e7be3 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -1253,8 +1253,6 @@ static int parse_and_validate_options(int argc, const char *argv[], if (logfile || have_option_m || use_message) use_editor = 0; - if (0 <= edit_flag) - use_editor = edit_flag; /* Sanity check options */ if (amend && !current_head) @@ -1344,6 +1342,9 @@ static int parse_and_validate_options(int argc, const char *argv[], } } + if (0 <= edit_flag) + use_editor = edit_flag; + cleanup_mode = get_cleanup_mode(cleanup_arg, use_editor); handle_untracked_files_arg(s); |