summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ed61604)
raw | patch | inline | side by side (parent: ed61604)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 9 Jul 2005 02:27:15 +0000 (19:27 -0700) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Sat, 9 Jul 2005 02:48:44 +0000 (19:48 -0700) |
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>
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>
git-format-patch-script | patch | blob | history |
index a07e30e8daf6a51bc4176fc60c1397b14630d25b..9d26c9c46a13115cfa26fe408b1a8892edad3df5 100755 (executable)
--- a/git-format-patch-script
+++ b/git-format-patch-script
1) linus="$1" junio=HEAD ;;
*) usage ;;
esac
+junio=`git-rev-parse --verify "$junio"`
+linus=`git-rev-parse --verify "$linus"`
case "$outdir" in
*/) ;;
series=$tmp-series
titleScript='
- 1,/^$/d
- : loop
- /^$/b loop
+ /./d
+ /^$/n
+ s/^\[PATCH[^]]*\] *//
s/[^-a-z.A-Z_0-9]/-/g
s/\.\.\.*/\./g
s/\.*$//
s/^-//
s/-$//
s/$/./
+ p
q
'
i=$total
while read commit
do
- title=`git-cat-file commit "$commit" | sed -e "$titleScript"`
+ title=`git-cat-file commit "$commit" |
+ git-stripspace |
+ sed -ne "$titleScript"`
case "$numbered" in
'') num= ;;
*)
echo "$file"
{
mailScript='
- 1,/^$/d
- : loop
- /^$/b loop
+ /./d
+ /^$/n
s|^|[PATCH'"$num"'] |
: body
p
n
b body'
- git-cat-file commit "$commit" | sed -ne "$mailScript"
+ git-cat-file commit "$commit" |
+ git-stripspace |
+ sed -ne "$mailScript"
echo '---'
echo
git-diff-tree -p $diff_opts "$commit" | git-apply --stat --summary