aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-11-30 14:35:07 -0800
committerJunio C Hamano <gitster@pobox.com>2009-11-30 14:35:07 -0800
commit5e2f779cbf60997809130fde213736e1ea4f6f33 (patch)
tree5d813dedae9d98c249538e9327c28b950d7fe163
parentb918eb6c2a949282a223bdb04ec8a524003f8c0c (diff)
parentc970a6fd0142da3740f0205f16f91d3f2ed7e258 (diff)
downloadgit-5e2f779cbf60997809130fde213736e1ea4f6f33.tar.gz
git-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 512891d21..4838cdb9e 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