summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-11-30 14:35:07 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-11-30 14:35:07 -0800
commit5e2f779cbf60997809130fde213736e1ea4f6f33 (patch)
tree5d813dedae9d98c249538e9327c28b950d7fe163
parentMerge branch 'bw/diff-color-hunk-header' (diff)
parentRemove dead code from "git am" (diff)
downloadtgif-5e2f779cbf60997809130fde213736e1ea4f6f33.tar.xz
Merge branch 'jc/maint-am-keep'
-rwxr-xr-xgit-am.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/git-am.sh b/git-am.sh
index 512891d217..4838cdb9ed 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -577,11 +577,12 @@ do
git cat-file commit "$commit" |
sed -e '1,/^$/d' >"$dotest/msg-clean"
else
- SUBJECT="$(sed -n '/^Subject/ s/Subject: //p' "$dotest/info")"
- case "$keep_subject" in -k) SUBJECT="[PATCH] $SUBJECT" ;; esac
-
- (printf '%s\n\n' "$SUBJECT"; cat "$dotest/msg") |
- git stripspace > "$dotest/msg-clean"
+ {
+ sed -n '/^Subject/ s/Subject: //p' "$dotest/info"
+ echo
+ cat "$dotest/msg"
+ } |
+ git stripspace > "$dotest/msg-clean"
fi
;;
esac