diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-11 18:34:10 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-11 18:34:10 -0800 |
commit | 98294e9875c05cdf2d4f16d446cb89ba6d41014a (patch) | |
tree | 39f17c0e8a4000deb516eb4d26ff9ad9de141102 /t/t4014-format-patch.sh | |
parent | 06fb494474fac626a410005c7d5364626153c69f (diff) | |
parent | 7952ea66e72d1129afbebcdde11dcbeecd92698a (diff) | |
download | git-98294e9875c05cdf2d4f16d446cb89ba6d41014a.tar.gz |
Merge branch 'jc/format-patch-reroll'
Teach "format-patch" to prefix v4- to its output files for the
fourth iteration of a patch series, to make it easier for the
submitter to keep separate copies for iterations.
* jc/format-patch-reroll:
format-patch: give --reroll-count a short synonym -v
format-patch: document and test --reroll-count
format-patch: add --reroll-count=$N option
get_patch_filename(): split into two functions
get_patch_filename(): drop "just-numbers" hack
get_patch_filename(): simplify function signature
builtin/log.c: stop using global patch_suffix
builtin/log.c: drop redundant "numbered_files" parameter from make_cover_letter()
builtin/log.c: drop unused "numbered" parameter from make_cover_letter()
Diffstat (limited to 't/t4014-format-patch.sh')
-rwxr-xr-x | t/t4014-format-patch.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index dc0d8ae928..7fa3647514 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -271,6 +271,22 @@ test_expect_success 'multiple files' ' ls patches/0001-Side-changes-1.patch patches/0002-Side-changes-2.patch patches/0003-Side-changes-3-with-n-backslash-n-in-it.patch ' +test_expect_success 'reroll count' ' + rm -fr patches && + git format-patch -o patches --cover-letter --reroll-count 4 master..side >list && + ! grep -v "^patches/v4-000[0-3]-" list && + sed -n -e "/^Subject: /p" $(cat list) >subjects && + ! grep -v "^Subject: \[PATCH v4 [0-3]/3\] " subjects +' + +test_expect_success 'reroll count (-v)' ' + rm -fr patches && + git format-patch -o patches --cover-letter -v4 master..side >list && + ! grep -v "^patches/v4-000[0-3]-" list && + sed -n -e "/^Subject: /p" $(cat list) >subjects && + ! grep -v "^Subject: \[PATCH v4 [0-3]/3\] " subjects +' + check_threading () { expect="$1" && shift && |