summaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-04-17 10:23:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-19 03:05:36 (GMT)
commit1a2b985fb375e7ce14932bfc59365024af2fb6ab (patch)
tree037601e08fa0b4b958b8342b77f991c75799ca97 /builtin/merge.c
parentdc42e9a83a9e9206566b6bc9b57f431b98682b29 (diff)
downloadgit-1a2b985fb375e7ce14932bfc59365024af2fb6ab.zip
git-1a2b985fb375e7ce14932bfc59365024af2fb6ab.tar.gz
git-1a2b985fb375e7ce14932bfc59365024af2fb6ab.tar.bz2
cherry-pick/revert: add scissors line on merge conflict
Fix a bug where the scissors line is placed after the Conflicts: section, in the case where a merge conflict occurs and commit.cleanup = scissors. Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge.c')
-rw-r--r--builtin/merge.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index 03b9f72..e96f72a 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -927,14 +927,8 @@ static int suggest_conflicts(void)
* Thus, we will get the cleanup mode which is returned when we _are_
* using an editor.
*/
- if (get_cleanup_mode(cleanup_arg, 1) == COMMIT_MSG_CLEANUP_SCISSORS) {
- fputc('\n', fp);
- wt_status_add_cut_line(fp);
- /* comments out the newline from append_conflicts_hint */
- fputc(comment_line_char, fp);
- }
-
- append_conflicts_hint(&the_index, &msgbuf);
+ append_conflicts_hint(&the_index, &msgbuf,
+ get_cleanup_mode(cleanup_arg, 1));
fputs(msgbuf.buf, fp);
strbuf_release(&msgbuf);
fclose(fp);