diff options
author | Denton Liu <liu.denton@gmail.com> | 2019-04-17 13:23:27 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-18 07:49:29 +0300 |
commit | d540b70c85ccd08507348785fd210ef8317a864d (patch) | |
tree | 8878e04d0d1ed6255dc880fe5753cbeee94b7699 /t/t5521-pull-options.sh | |
parent | ca04dc96d13cbe5aead17a936e3b8695b20abb55 (diff) |
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 <sunshine@sunshineco.com>
Signed-off-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 't/t5521-pull-options.sh')
-rwxr-xr-x | t/t5521-pull-options.sh | 8 |
1 files changed, 8 insertions, 0 deletions
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 && |