summaryrefslogtreecommitdiff
path: root/tools/git-applypatch
diff options
context:
space:
mode:
Diffstat (limited to 'tools/git-applypatch')
-rwxr-xr-xtools/git-applypatch5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/git-applypatch b/tools/git-applypatch
index 5a3a44b..406fef3 100755
--- a/tools/git-applypatch
+++ b/tools/git-applypatch
@@ -16,6 +16,7 @@ final=.dotest/final-commit
## If this file exists, we ask before applying
##
query_apply=.dotest/.query_apply
+keep_subject=.dotest/.keep_subject
MSGFILE=$1
PATCHFILE=$2
INFO=$3
@@ -30,8 +31,10 @@ export SUBJECT="$(sed -n '/^Subject/ s/Subject: //p' .dotest/info)"
if [ -n "$signoff" -a -f "$signoff" ]; then
cat $signoff >> $MSGFILE
fi
+patch_header=
+test -f "$keep_subject" || patch_header='[PATCH] '
-(echo "[PATCH] $SUBJECT" ; if [ -s $MSGFILE ]; then echo ; cat $MSGFILE; fi ) > $final
+(echo "$patch_header$SUBJECT" ; if [ -s $MSGFILE ]; then echo ; cat $MSGFILE; fi ) > $final
f=0
[ -f $query_apply ] || f=1