aboutsummaryrefslogtreecommitdiff
path: root/t/t4014-format-patch.sh
Commit message (Collapse)AuthorAge
* tests: Add tests for missing format-patch long optionsStephen Boyd2009-05-16
| | | | | | | | Exercise format-patch's --signoff, --in-reply-to and --start-number long options. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* format-patch: add arbitrary email headersMichael Hendricks2009-03-27
| | | | | | | | | | | | | format-patch supports the format.headers configuration for adding arbitrary email headers to the patches it outputs. This patch adds support for an --add-header argument which makes the same feature available from the command line. This is useful when the content of custom email headers must change from branch to branch. This patch has been sponsored by Grant Street Group Signed-off-by: Michael Hendricks <michael@ndrix.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* test-lib: Introduce test_chmod and use it instead of update-index --chmodJohannes Sixt2009-03-19
| | | | | | | | | | | | | | | | | | | | This function replaces sequences of 'chmod +x' and 'git update-index --chmod=+x' in the test suite, whose purpose is to help filesystems that need core.filemode=false. Two places where only 'chmod +x' was used we also use this new function. The function calls 'git update-index --chmod' without checking core.filemode (unlike some of the call sites did). We do this because the call sites *expect* that the executable bit ends up in the index (ie. it is not the purpose of the call sites to *test* whether git treats 'chmod +x' and 'update-index --chmod=+x' correctly). Therefore, on filesystems with core.filemode=true the 'git update-index --chmod' is a no-op. The function uses --add with update-index to help one call site in t6031-merge-recursive. It makes no difference for the other callers. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
* format-patch: support deep threadingThomas Rast2009-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For deep threading mode, i.e., the mode that gives a thread structured like + [PATCH 0/n] Cover letter `-+ [PATCH 1/n] First patch `-+ [PATCH 2/n] Second patch `-+ ... we currently have to use 'git send-email --thread' (the default). On the other hand, format-patch also has a --thread option which gives shallow mode, i.e., + [PATCH 0/n] Cover letter |-+ [PATCH 1/n] First patch |-+ [PATCH 2/n] Second patch ... To reduce the confusion resulting from having two indentically named features in different tools giving different results, let format-patch take an optional argument '--thread=deep' that gives the same output as 'send-mail --thread'. With no argument, or 'shallow', behave as before. Also add a configuration variable format.thread with the same semantics. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* format-patch: thread as reply to cover letter even with in-reply-toThomas Rast2009-02-21
| | | | | | | | | | | | | | Currently, format-patch --thread --cover-letter --in-reply-to $parent makes all mails, including the cover letter, a reply to $parent. However, we would want the reader to consider the cover letter above all the patches. This changes the semantics so that only the cover letter is a reply to $parent, while all the patches are formatted as replies to the cover letter. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* format-patch: threading test reactivationThomas Rast2009-02-19
| | | | | | | | | | | | | | | | | | | | t4014 tests format-patch --thread since 7d812145, but the tests were ineffective right from the start at least for bash and dash. The loops of the form for ...; do something || break; done introduced by 7d812145 and 5d02294 always exit with status 0, even if 'something' failed, because 'break' returns 0 unless there was no loop to break. We take a rather different approach that uses an admittedly heinous inline Perl script to mangle all interesting information into a format that is invariant between runs. We can then test the full patch sequence in one go (with --stdout), doing away with the loop problem. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jc/maint-format-patch-o-relative'Junio C Hamano2009-01-21
|\ | | | | | | | | | | | | | | * jc/maint-format-patch-o-relative: Teach format-patch to handle output directory relative to cwd Conflicts: t/t4014-format-patch.sh
| * Teach format-patch to handle output directory relative to cwdJunio C Hamano2009-01-12
| | | | | | | | | | | | | | | | | | | | Without any explicit -o parameter, we correctly avoided putting the resulting patch output to the toplevel. We should do the same when the user gave a relative pathname to be consistent with this case. Noticed by Cesar Eduardo Barros. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | format-patch: use default diff format even with patch optionsJeff King2008-08-26
|/ | | | | | | | | | | | | | | | | Previously, running "git format-patch -U5" would cause the low-level diff machinery to change the diff output format from "not specified" to "patch". This meant that format-patch thought we explicitly specified a diff output format, and would not use the default format. The resulting message lacked both the diffstat and the summary, as well as the separating "---". Now format-patch explicitly checks for this condition and uses the default. That means that "git format-patch -p" will now have the "-p" ignored. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fix whitespace violations in test scriptsJeff King2008-06-14
| | | | | | | | | These violations are simply wrong, but were never caught because whitespace policy checking is turned off in the test scripts. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* tests: do not use implicit "git diff --no-index"Junio C Hamano2008-05-24
| | | | | | | | | | | As a general principle, we should not use "git diff" to validate the results of what git command that is being tested has done. We would not know if we are testing the command in question, or locating a bug in the cute hack of "git diff --no-index". Rather use test_cmp for that purpose. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* format-patch: wrap cover-letter's shortlog sensiblyJohannes Schindelin2008-03-02
| | | | | | | | | | | Earlier, overly-long onelines would not be wrapped at all, and indented with 6 spaces. Instead, we now wrap around at 72 characters, with a first-line indent of 2 spaces, and the rest with 4 spaces. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* format-patch: use the diff options for the cover letter, tooJohannes Schindelin2008-03-02
| | | | | | | | | | | Earlier, when you called "git format-patch --cover-letter -M", the diffstat in the cover letter would not inherit the "-M". Now it does. While at it, add a few "|| break" statements in the test's loops; otherwise, breakages inside the loops would not be caught. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t4014: Replace sed's non-standard 'Q' by standard 'q'Steffen Prohaska2008-02-23
| | | | | | | | | t4014 test used GNU extension 'Q' in its sed scripts, but the uses can safely be replaced with 'q'. Among other platforms, sed on Mac OS X 10.4 does not accept the former. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Support a --cc=<email> option in format-patchDaniel Barkalow2008-02-19
| | | | | | | | | | When you have particular reviewers you want to sent particular series to, it's nice to be able to generate the whole series with them as additional recipients, without configuring them into your general headers or adding them by hand afterwards. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Combine To: and Cc: headersDaniel Barkalow2008-02-19
| | | | | | | | | | | RFC 2822 only permits a single To: header and a single Cc: header, so we need to turn multiple values of each of these into a list. This will be particularly significant with a command-line option to add Cc: headers, where the user can't make sure to configure valid header sets in any easy way. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix format.headers not ending with a newlineDaniel Barkalow2008-02-19
| | | | | | | | Now each value of format.headers will always be treated as a single valid header, and newlines will be inserted between them as needed. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add tests for extra headers in format-patchDaniel Barkalow2008-02-19
| | | | | | | | | | Presently, it works with each header ending with a newline, but not without the newlines. Also add a test to see that multiple "To:" headers get combined. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add a --cover-letter option to format-patchDaniel Barkalow2008-02-19
| | | | | | | | | | If --cover-letter is provided, generate a cover letter message before the patches, numbered 0. Original patch thanks to Johannes Schindelin Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add more tests for format-patchDaniel Barkalow2008-02-19
| | | | | | | | Tests -o, and an excessively long subject, and --thread, with and without --in-reply-to= Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t/t4014: test "am -3" with mode-only change.Junio C Hamano2007-09-18
| | | | | | | | Earlier commit ece7b74903007cee8d280573647243d46a6f3a95 added a test for rebase that uses "am -3", but this adds a test to check "am -3" itself. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add tests for the last two fixes.Junio C Hamano2007-05-26
| | | | | | | | This updates t4014 to check the two fixes for git-am and git-commit we observed with "echo" that does backslash interpolation by default without being asked with -e option. Signed-off-by: Junio C Hamano <junkio@cox.net>
* t4014: fix test commit labels.Junio C Hamano2006-06-28
| | | | | | | | The commit tag and commit comments used in the test claimed that the #1 commit was merged upstream where the test actually let the upstream merge #2 commit. Fix them. Signed-off-by: Junio C Hamano <junkio@cox.net>
* t4014: fix for whitespace from "wc -l"Johannes Schindelin2006-06-27
| | | | | | | Some "wc" insist on putting a TAB in front of the number. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* t4014: add format-patch --ignore-if-in-upstream testJunio C Hamano2006-06-26
Signed-off-by: Junio C Hamano <junkio@cox.net>