]> git.ipfire.org Git - thirdparty/git.git/commit - git-stash.sh
Fix git-stash apply --index
authorJunio C Hamano <gitster@pobox.com>
Sat, 28 Jul 2007 06:41:31 +0000 (23:41 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 28 Jul 2007 07:06:00 +0000 (00:06 -0700)
commitcbeaccc316affa2e0fb0b60f569d5da9bf444881
treeba4eed2d1041ea5225b38ca3914e545f6d4c55da
parentf12e925ac23ad6169e046cfe05b8438a1611ad58
Fix git-stash apply --index

Two bugs that made the command practically unusable were fixed
with this.

 - A stash created with a clean index does not have any
   difference between the base tree and the index tree.
   Trying to apply the diff between them to the index would
   error out with "No changes".  Even when the user asked to
   unstash with --index, do not bother with --index action if
   the base tree and the index tree match.

 - After successfully performing the working tree merge, the
   index was reloaded from an earlier state of unstashed index
   with "read-tree"; this left all the paths cache dirty.  By
   moving the call to git-status after this read-tree, match the
   cached stat information in the index.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-stash.sh