summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-am.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/git-am.sh b/git-am.sh
index b6068df6bf..d3f6a89352 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -693,7 +693,13 @@ do
else
action=yes
fi
- FIRSTLINE=$(sed 1q "$dotest/final-commit")
+
+ if test -f "$dotest/final-commit"
+ then
+ FIRSTLINE=$(sed 1q "$dotest/final-commit")
+ else
+ FIRSTLINE=""
+ fi
if test $action = skip
then