author | Junio C Hamano <gitster@pobox.com> | |
Sat, 28 Jul 2007 06:41:31 +0000 (23:41 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 28 Jul 2007 07:06:00 +0000 (00:06 -0700) | ||
commit | cbeaccc316affa2e0fb0b60f569d5da9bf444881 | |
tree | ba4eed2d1041ea5225b38ca3914e545f6d4c55da | tree | snapshot |
parent | f12e925ac23ad6169e046cfe05b8438a1611ad58 | commit | diff |
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>
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 | diff | blob | history |