Skip to content

Commit 92f65e6

Browse files
artagnongitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dc267b1 commit 92f65e6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

git-am.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,13 @@ do
693693
else
694694
action=yes
695695
fi
696-
FIRSTLINE=$(sed 1q "$dotest/final-commit")
696+
697+
if test -f "$dotest/final-commit"
698+
then
699+
FIRSTLINE=$(sed 1q "$dotest/final-commit")
700+
else
701+
FIRSTLINE=""
702+
fi
697703

698704
if test $action = skip
699705
then

0 commit comments

Comments
 (0)