aboutsummaryrefslogtreecommitdiff
path: root/git-am.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/git-am.sh b/git-am.sh
index 5a7695efa..75886a8f2 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -338,7 +338,7 @@ do
SUBJECT="$(sed -n '/^Subject/ s/Subject: //p' "$dotest/info")"
case "$keep_subject" in -k) SUBJECT="[PATCH] $SUBJECT" ;; esac
- (echo "$SUBJECT" ; echo ; cat "$dotest/msg") |
+ (printf '%s\n\n' "$SUBJECT"; cat "$dotest/msg") |
git stripspace > "$dotest/msg-clean"
fi
;;
@@ -392,7 +392,6 @@ do
;;
esac
esac
- FIRSTLINE=$(head -1 "$dotest/final-commit")
resume=
if test "$interactive" = t
@@ -413,7 +412,6 @@ do
[aA]*) action=yes interactive= ;;
[nN]*) action=skip ;;
[eE]*) git_editor "$dotest/final-commit"
- FIRSTLINE=$(head -1 "$dotest/final-commit")
action=again ;;
[vV]*) action=again
LESS=-S ${PAGER:-less} "$dotest/patch" ;;
@@ -423,6 +421,7 @@ do
else
action=yes
fi
+ FIRSTLINE=$(head -1 "$dotest/final-commit")
if test $action = skip
then