diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-07-28 12:02:34 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-28 12:02:34 -0700 |
| commit | d345ceda32412d8575234ad8b959d9f598b00a6e (patch) | |
| tree | 3fab6580d77ba77fd75de4d360d36d2db06be60d /t | |
| parent | Merge branch 'rs/pop-recent-commit-with-prio-queue' (diff) | |
| parent | config: set comment_line_str to "#" when core.commentChar=auto (diff) | |
| download | git-d345ceda32412d8575234ad8b959d9f598b00a6e.tar.gz git-d345ceda32412d8575234ad8b959d9f598b00a6e.zip | |
Merge branch 'ac/auto-comment-char-fix'
"git commit" that concludes a conflicted merge failed to notice and remove
existing comment added automatically (like "# Conflicts:") when the
core.commentstring is set to 'auto'.
* ac/auto-comment-char-fix:
config: set comment_line_str to "#" when core.commentChar=auto
commit: avoid scanning trailing comments when 'core.commentChar' is "auto"
Diffstat (limited to 't')
| -rwxr-xr-x | t/t3418-rebase-continue.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh index 127216f722..b8a8dd77e7 100755 --- a/t/t3418-rebase-continue.sh +++ b/t/t3418-rebase-continue.sh @@ -328,6 +328,19 @@ test_expect_success 'there is no --no-reschedule-failed-exec in an ongoing rebas test_expect_code 129 git rebase --edit-todo --no-reschedule-failed-exec ' +test_expect_success 'no change in comment character due to conflicts markers with core.commentChar=auto' ' + git checkout -b branch-a && + test_commit A F1 && + git checkout -b branch-b HEAD^ && + test_commit B F1 && + test_must_fail git rebase branch-a && + printf "B\nA\n" >F1 && + git add F1 && + GIT_EDITOR="cat >actual" git -c core.commentChar=auto rebase --continue && + # Check that "#" is still the comment character. + test_grep "^# Changes to be committed" actual +' + test_orig_head_helper () { test_when_finished 'git rebase --abort && git checkout topic && |
