Skip to content

Commit

Permalink
[PATCH] Add "--sign" option to git-format-patch-script
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Aug 12, 2005
1 parent 33b8303 commit b097584
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion git-format-patch-script
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
. git-sh-setup-script || die "Not a git archive."

usage () {
echo >&2 "usage: $0"' [-n] [-o dir] [--mbox] [--check] [-<diff options>...] upstream [ our-head ]
echo >&2 "usage: $0"' [-n] [-o dir] [--mbox] [--check] [--sign] [-<diff options>...] upstream [ our-head ]
Prepare each commit with its patch since our-head forked from upstream,
one file per patch, for e-mail submission. Each output file is
Expand Down Expand Up @@ -46,6 +46,8 @@ do
date=t author=t mbox=t ;;
-n|--n|--nu|--num|--numb|--numbe|--number|--numbere|--numbered)
numbered=t ;;
-s|--s|--si|--sig|--sign)
signoff=t ;;
-o=*|--o=*|--ou=*|--out=*|--outp=*|--outpu=*|--output=*|--output-=*|\
--output-d=*|--output-di=*|--output-dir=*|--output-dire=*|\
--output-direc=*|--output-direct=*|--output-directo=*|\
Expand Down Expand Up @@ -174,6 +176,14 @@ Date: '"$ad"
b body'

sed -ne "$mailScript" <$commsg

test "$signoff" = "t" && {
offsigner=`git-var GIT_COMMITTER_IDENT | sed -e 's/>.*/>/'`
echo
echo "Signed-off-by: $offsigner"
echo
}

echo '---'
echo
git-diff-tree -p $diff_opts "$commit" | git-apply --stat --summary
Expand Down

0 comments on commit b097584

Please sign in to comment.