From d540b70c85ccd08507348785fd210ef8317a864d Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Wed, 17 Apr 2019 11:23:27 +0100 Subject: merge: cleanup messages like commit This change allows git-merge messages to be cleaned up with the commit.cleanup configuration or --cleanup option, just like how git-commit does it. We also give git-pull the option of --cleanup so that it can also take advantage of this change. Finally, add testing to ensure that messages are properly cleaned up. Note that some newlines that were added to the commit message were removed so that if a file were read via -F, it would be copied faithfully. Helped-by: Eric Sunshine Signed-off-by: Phillip Wood Signed-off-by: Denton Liu Signed-off-by: Junio C Hamano --- t/t5521-pull-options.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 't/t5521-pull-options.sh') diff --git a/t/t5521-pull-options.sh b/t/t5521-pull-options.sh index c19d8dbc9d9..ccde8ba491e 100755 --- a/t/t5521-pull-options.sh +++ b/t/t5521-pull-options.sh @@ -77,6 +77,14 @@ test_expect_success 'git pull -q -v' ' test_must_be_empty out && test -s err) ' +test_expect_success 'git pull --cleanup errors early on invalid argument' ' + mkdir clonedcleanup && + (cd clonedcleanup && git init && + test_must_fail git pull --cleanup invalid "../parent" >out 2>err && + test_must_be_empty out && + test -s err) +' + test_expect_success 'git pull --force' ' mkdir clonedoldstyle && -- cgit v1.2.3