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:
Diffstat (limited to 'git-checkout.sh')
-rwxr-xr-xgit-checkout.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-checkout.sh b/git-checkout.sh
index 6a87c717e9..76e7f55226 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -165,8 +165,10 @@ else
exit 0
)
saved_err=$?
- test "$new" = "$old" ||
- git diff-index --name-status "$new"
+ if test "$saved_err" = 0
+ then
+ test "$new" = "$old" || git diff-index --name-status "$new"
+ fi
(exit $saved_err)
fi