path: root/git-format-patch-script
AgeCommit message (Collapse)Author
2005-08-19[PATCH] Fix git-format-patch-script to handle empty messagesMarco Costalba
In case of a commit with an empty message there is no mandatory empty line between headers and body [jc: This makes --mbox output valid even when the commit message does not have anything but its first line, which the one I wrote botched. One side-effect is that it adds an extra blank line at the end even if it has more than one lines, which will be eaten by the receiving end. As Marco says, this is a stop-gap measure. This script needs to be split into two, one that gets the format specifier and a commit ID to write to its standard output, and another that drives that one reading from rev-list. I'll fix things properly when that happens by rewriting the former part in Perl or something more reasonable than the current shell, sed and grep mishmash.] Signed-off-by: Marco Costalba <> Signed-off-by: Junio C Hamano <>
2005-08-17[PATCH] Let git-format-patch-script write on stdoutMarco Costalba
Avoid that git-format-patch writes out patch series information on stderr when there are no errors Signed-off-by: Marco Costalba <> Signed-off-by: Junio C Hamano <>
2005-08-17git-format-patch fixes.Junio C Hamano
Introduces --keep-subjects flag to tell it not to munge the first line of the commit message. Running "git applymbox" on the output from "git format-patch -m -k" would preserve the original commit information better this way. At the same time, prefix Subject: on the first line of the commit, to help people cut&copy. Signed-off-by: Junio C Hamano <>
2005-08-16[PATCH] Make git-format-patch's signoff option more consistentJohannes Schindelin
Since git-commit-script has a "--signoff" option, use that in git-format-patch-script, too (and since partial option names are supported,"--sign" is still valid). Also, if the message already contains the S-O-B line, silently ignore the "--signoff" request. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2005-08-12[PATCH] Add "--sign" option to git-format-patch-scriptJohannes Schindelin
This adds the option "--sign" to git-format-patch-script which adds a Signed-off-by: line automatically. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2005-08-10Skip merges in format-patch.Junio C Hamano
2005-08-10Teach format-patch, rebase and cherry a..b formatJunio C Hamano
Although these commands take only begin and end, not necessarily generic SHA1 expressions rev-parse supports, supporting a..b notation is good for consistency. This commit adds such without breaking backward compatibility. Signed-off-by: Junio C Hamano <>
2005-08-01[PATCH] Do not rely on a sane wcJohannes Schindelin
Some implementations of wc pad the line number with white space, which expr does not grok as a number. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2005-07-22[PATCH] format-patch: --mbox and --check.Junio C Hamano
Add --mbox option to export patches in a format resembling UNIX mbox, so that later they can be concatenated and fed to applymbox. Add --check to look for lines that introduce bogus whitespaces. Signed-off-by: Junio C Hamano <> Signed-off-by: Linus Torvalds <>
2005-07-22[PATCH] git-format-patch-script and mailinfo updates.Junio C Hamano
- avoid duplicating [PATCH] in the commit message body if the original commit has it already (happens for commits done from mails via applymbox). - check if the commit author is different from the one who is running the script, and emit an appropriate "From:" and "Date: " lines to the output. - with '--date', emit "Date: " line to preserve the original author date even for the user's own commit. - teach mailinfo to grok not just "From: " but "Date: ". The patch e-mail output by format-patch starts with the first line from the original commit message, prefixed with [PATCH], and optionally a From: line if you are reformatting a patch obtained from somebody else, a Date: line from the original commit if (1) --date is specified or (2) for somebody else's patch, and the rest of the commit message body. Expected use of this is to move the title line from the commit to Subject: when sending it via an e-mail, and leave the From: and the Date: lines as the first lines of your message. The mailinfo command has been changed to read Date: (in addition to From: it already understands) and do sensible things when running applymbox. Signed-off-by: Junio C Hamano <> Signed-off-by: Linus Torvalds <>
2005-07-09[PATCH] format-patch: fix skipping of blank-linesJunio C Hamano
If it is fed a commit with more than one leading blank lines, the sed scripts git-format-patch-script used looped forever. Using git-stripspace upfront makes the sed script somewhat simpler to work around this problem. Also use git-rev-parse so that we can say $ git-format-patch-script HEAD^^^^ to prepare the latest four patches for e-mail submission. Signed-off-by: Junio C Hamano <> Signed-off-by: Linus Torvalds <>
2005-07-08[PATCH] git-format-patch: Prepare patches for e-mail submission.Junio C Hamano
This is the script I use to prepare patches for e-mail submission. Signed-off-by: Junio C Hamano <> Signed-off-by: Linus Torvalds <>