diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-03-25 11:07:47 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-03-25 11:07:48 -0700 |
commit | 46c0f913a49218a8a94d30c5a2df792a16aab827 (patch) | |
tree | efc504f849bced5dd3c5b155ab5c4fce4fcbcf14 /t/t7502-commit.sh | |
parent | d4c6e9fb6f0db328a40905a3555f8f41d37aaec5 (diff) | |
parent | 75df1f434f8cfdac1c8eeacae259ab375c01385b (diff) | |
download | git-46c0f913a49218a8a94d30c5a2df792a16aab827.tar.gz |
Merge branch 'nd/commit-editor-cleanup'
"git commit --cleanup=<mode>" learned a new mode, scissors.
* nd/commit-editor-cleanup:
commit: add --cleanup=scissors
wt-status.c: move cut-line print code out to wt_status_add_cut_line
wt-status.c: make cut_line[] const to shrink .data section a bit
Diffstat (limited to 't/t7502-commit.sh')
-rwxr-xr-x | t/t7502-commit.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh index 6313da2cdd..9a3f3a1b41 100755 --- a/t/t7502-commit.sh +++ b/t/t7502-commit.sh @@ -223,6 +223,22 @@ test_expect_success 'cleanup commit messages (whitespace option,-F)' ' ' +test_expect_success 'cleanup commit messages (scissors option,-F,-e)' ' + + echo >>negative && + cat >text <<EOF && + +# to be kept +# ------------------------ >8 ------------------------ +to be removed +EOF + echo "# to be kept" >expect && + git commit --cleanup=scissors -e -F text -a && + git cat-file -p HEAD |sed -e "1,/^\$/d">actual && + test_cmp expect actual + +' + test_expect_success 'cleanup commit messages (strip option,-F)' ' echo >>negative && |