1
0
mirror of https://github.com/git/git.git synced 2024-10-06 23:51:24 +02:00
Commit Graph

12 Commits

Author SHA1 Message Date
Marco Costalba
cc5625a5e2 [PATCH] Fix git-format-patch-script to handle empty messages
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 <mcostalba@yahoo.it>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-19 11:32:54 -07:00
Marco Costalba
f01c0fceef [PATCH] Let git-format-patch-script write on stdout
Avoid that git-format-patch writes out patch series
information on stderr when there are no errors

Signed-off-by: Marco Costalba <mcostalba@yahoo.it>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-17 12:13:12 -07:00
Junio C Hamano
af5260ee78 git-format-patch fixes.
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 <junkio@cox.net>
2005-08-16 22:22:35 -07:00
Johannes Schindelin
d9ac9df41c [PATCH] Make git-format-patch's signoff option more consistent
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 <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-15 17:44:16 -07:00
Johannes Schindelin
b097584b79 [PATCH] Add "--sign" option to git-format-patch-script
This adds the option "--sign" to git-format-patch-script which adds
a Signed-off-by: line automatically.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-12 10:38:21 -07:00
Junio C Hamano
c35a7b8d80 Skip merges in format-patch. 2005-08-10 00:06:56 -07:00
Junio C Hamano
4282c4fbdd Teach format-patch, rebase and cherry a..b format
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 <junkio@cox.net>
2005-08-09 23:38:50 -07:00
Johannes Schindelin
9b75e9fa7b [PATCH] Do not rely on a sane wc
Some implementations of wc pad the line number with white space, which
expr does not grok as a number.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-01 13:27:09 -07:00
Junio C Hamano
5c2c972f47 [PATCH] format-patch: --mbox and --check.
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 <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-22 16:29:28 -07:00
Junio C Hamano
44d2eb51b1 [PATCH] git-format-patch-script and mailinfo updates.
- 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 <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-22 16:29:28 -07:00
Junio C Hamano
1855c04462 [PATCH] format-patch: fix skipping of blank-lines
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 <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-08 19:48:44 -07:00
Junio C Hamano
0acfc97252 [PATCH] git-format-patch: Prepare patches for e-mail submission.
This is the script I use to prepare patches for e-mail submission.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07 18:07:12 -07:00