diff options
author | Ralf Thielow <ralf.thielow@gmail.com> | 2013-08-21 20:48:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-08-21 15:44:15 -0700 |
commit | a9f739c111898ed879bc077fb3a2f71b9766bba7 (patch) | |
tree | 091ee674536fba965c690fd93004738a31caa94c /t/t3409-rebase-preserve-merges.sh | |
parent | 4d06473928ee574910accbde05c19ef2263abdf6 (diff) | |
download | git-a9f739c111898ed879bc077fb3a2f71b9766bba7.tar.gz git-a9f739c111898ed879bc077fb3a2f71b9766bba7.tar.xz |
rebase --preserve-merges: ignore "merge.log" config
When "merge.log" config is set, "rebase --preserve-merges" will add
the log lines to the message of the rebased merge commit. A rebase
should not modify a commit message automatically.
Teach "git-rebase" to ignore that configuration by passing
"--no-log" to the git-merge call.
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3409-rebase-preserve-merges.sh')
-rwxr-xr-x | t/t3409-rebase-preserve-merges.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t3409-rebase-preserve-merges.sh b/t/t3409-rebase-preserve-merges.sh index 2e0c36415..8c251c57a 100755 --- a/t/t3409-rebase-preserve-merges.sh +++ b/t/t3409-rebase-preserve-merges.sh @@ -28,6 +28,8 @@ export GIT_AUTHOR_EMAIL # \--A3 <-- topic2 # \ # B2 <-- origin/topic +# +# Clone 4 (same as Clone 3) test_expect_success 'setup for merge-preserving rebase' \ 'echo First > A && @@ -64,6 +66,16 @@ test_expect_success 'setup for merge-preserving rebase' \ git merge --no-ff topic2 ) && + git clone ./. clone4 && + ( + cd clone4 && + git checkout -b topic2 origin/topic && + echo Sixth > A && + git commit -a -m "Modify A3" && + git checkout -b topic origin/topic && + git merge --no-ff topic2 + ) && + git checkout topic && echo Fourth >> B && git commit -a -m "Modify B2" @@ -96,4 +108,15 @@ test_expect_success 'rebase -p preserves no-ff merges' ' ) ' +test_expect_success 'rebase -p ignores merge.log config' ' + ( + cd clone4 && + git fetch && + git -c merge.log=1 rebase -p origin/topic && + echo >expected && + git log --format="%b" -1 >current && + test_cmp expected current + ) +' + test_done |