Browse Source

checkout: fix dirty-file display.

When we refused to switch branches, we incorrectly showed
differences from the branch we would have switched to.

Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Junio C Hamano 19 years ago
parent
commit
504fe714fe
  1. 6
      git-checkout.sh

6
git-checkout.sh

@ -165,8 +165,10 @@ else @@ -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


Loading…
Cancel
Save