Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-stash: Fix listing stashes
author
Emil Medve
<Emilian.Medve@Freescale.com>
Wed, 7 Nov 2007 21:10:27 +0000
(15:10 -0600)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 7 Nov 2007 22:00:12 +0000
(14:00 -0800)
Commit
bc9e7399af3790918140c30a5b2c85bf9a8f1ad3
"reverted" commit
f12e925ac23ad6169e046cfe05b8438a1611ad58
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-stash.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
a64d778
)
diff --git
a/git-stash.sh
b/git-stash.sh
index 04af892531b400716aad3502a37c89e36c9bad51..696b465b7c7853f717dca6b2c865647161df25d9 100755
(executable)
--- a/
git-stash.sh
+++ b/
git-stash.sh
@@
-21,7
+21,7
@@
no_changes () {
clear_stash () {
if current=$(git rev-parse --verify $ref_stash 2>/dev/null)
then
clear_stash () {
if current=$(git rev-parse --verify $ref_stash 2>/dev/null)
then
- git update-ref -d
refs/
stash $current
+ git update-ref -d
$ref_
stash $current
fi
}
fi
}
@@
-92,6
+92,10
@@
save_stash () {
clear_stash || die "Cannot initialize stash"
create_stash "$stash_msg"
clear_stash || die "Cannot initialize stash"
create_stash "$stash_msg"
+
+ # Make sure the reflog for stash is kept.
+ : >>"$GIT_DIR/logs/$ref_stash"
+
git update-ref -m "$stash_msg" $ref_stash $w_commit ||
die "Cannot save the current status"
printf >&2 'Saved "%s"\n' "$stash_msg"
git update-ref -m "$stash_msg" $ref_stash $w_commit ||
die "Cannot save the current status"
printf >&2 'Saved "%s"\n' "$stash_msg"