* [PATCH] git-stash: Fix listing stashes
@ 2007-11-07 21:10 Emil Medve
2007-11-07 22:03 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Emil Medve @ 2007-11-07 21:10 UTC (permalink / raw)
To: gitster, nanako3, git; +Cc: Emil Medve
Commit bc9e7399af3790918140c30a5b2c85bf9a8f1ad3 "reverted" commit
f12e925ac23ad6169e046cfe05b8438a1611ad58
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
---
git-stash.sh | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/git-stash.sh b/git-stash.sh
index e556f42..534eb16 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -22,7 +22,7 @@ no_changes () {
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
}
@@ -93,6 +93,10 @@ save_stash () {
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"
--
1.5.3.GIT
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-07 22:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-07 21:10 [PATCH] git-stash: Fix listing stashes Emil Medve
2007-11-07 22:03 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).