In preparation for a later patch that creates $dotest/autostash in git-rebase.sh before anything else happens, don't assume that the presence of a $dotest directory implies the existence of the $next and $last files. The check for the files is in a conditional anyway, but `cat` is executed on potentially non-existent files. Suppress this error output. Signed-off-by: Ramkumar Ramachandra <artagnon@xxxxxxxxx> --- git-am.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-am.sh b/git-am.sh index c092855..88aa438 100755 --- a/git-am.sh +++ b/git-am.sh @@ -446,8 +446,8 @@ done # If the dotest directory exists, but we have finished applying all the # patches in them, clear it out. if test -d "$dotest" && - last=$(cat "$dotest/last") && - next=$(cat "$dotest/next") && + last=$(cat "$dotest/last" 2>/dev/null) && + next=$(cat "$dotest/next" 2>/dev/null) && test $# != 0 && test "$next" -gt "$last" then -- 1.8.3.rc1.52.gc14258d -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html