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