Skip to content

Commit

Permalink
checkout: fix dirty-file display.
Browse files Browse the repository at this point in the history
When we refused to switch branches, we incorrectly showed
differences from the branch we would have switched to.

Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
Junio C Hamano committed Feb 15, 2006
1 parent 9ece716 commit 504fe71
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions git-checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 504fe71

Please sign in to comment.