[PATCH v2 3/3] git am: Remove stray error message from sed
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Jun 2, 2010, 08:33 UTC
- Message-ID
- <1275467617-23065-4-git-send-email-artagnon@gmail.com>
- In-Reply-To
- <1275467617-23065-1-git-send-email-artagnon@gmail.com>
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> --- git-am.sh | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/git-am.sh b/git-am.sh index a52c2b4..062b5a7 100755 --- a/git-am.sh +++ b/git-am.sh @@ -693,8 +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
-- 1.7.1