summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Ramkumar Ramachandra <artagnon@gmail.com>2010-06-02 10:33:37 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-06-02 09:53:45 -0700
commit92f65e6ab6185aae241d1388b54429d171a9d0f5 (patch)
treea0962096e5eeae540c33709ceff784de8ce79402
parentgit am: Display some help text when patch is empty (diff)
downloadtgif-92f65e6ab6185aae241d1388b54429d171a9d0f5.tar.xz
git am: Remove stray error message from sed
When --continue is invoked without any changes, the following stray error message appears- sed: can't read $dotest/final-commit: No such file or directory. Remove this by making sure that the file actually exists. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-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