Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2013-05-12 15:56:35 +0400
committerJunio C Hamano <gitster@pobox.com>2013-05-13 10:20:07 +0400
commitc30754f188a4f1bcd35d81d898086fea33524bd6 (patch)
tree8a25aa16802df0a12ba4878aa653941ef445f37d /git-am.sh
parent7d3ccdffb5d28970dd7a4d177cfcca690ccd0c22 (diff)
am: tighten a conditional that checks for $dotest
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 $dotest/next and $dotest/last files. Look for them explicitly. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-am.sh b/git-am.sh
index c092855dd7..ccb854a20e 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -446,6 +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" &&
+ test -f "$dotest/last" &&
+ test -f "$dotest/next" &&
last=$(cat "$dotest/last") &&
next=$(cat "$dotest/next") &&
test $# != 0 &&
@@ -454,7 +456,7 @@ then
rm -fr "$dotest"
fi
-if test -d "$dotest"
+if test -d "$dotest" && test -f "$dotest/last" && test -f "$dotest/next"
then
case "$#,$skip$resolved$abort" in
0,*t*)