From: Ramkumar Ramachandra Date: Wed, 2 Jun 2010 08:33:37 +0000 (+0200) Subject: git am: Remove stray error message from sed X-Git-Tag: v1.7.2-rc0~47^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=92f65e6ab6185aae241d1388b54429d171a9d0f5;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-am.sh b/git-am.sh index b6068df6b..d3f6a8935 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