Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-stash: avoid hardcoding $GIT_DIR/logs/....
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sun, 30 Nov 2014 08:24:39 +0000
(15:24 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 1 Dec 2014 19:00:14 +0000
(11:00 -0800)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-stash.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
b849b95
)
diff --git
a/git-stash.sh
b/git-stash.sh
index b6d4b06c5f9ab00c4b9708b9fe310a6b266ab663..6846b18dbc007a8b08c6f5a77fe568fb8625c28f 100755
(executable)
--- a/
git-stash.sh
+++ b/
git-stash.sh
@@
-184,7
+184,7
@@
store_stash () {
fi
# Make sure the reflog for stash is kept.
fi
# Make sure the reflog for stash is kept.
- : >>"$
GIT_DIR/logs/$ref_stash
"
+ : >>"$
(git rev-parse --git-path logs/$ref_stash)
"
git update-ref -m "$stash_msg" $ref_stash $w_commit
ret=$?
test $ret != 0 && test -z $quiet &&
git update-ref -m "$stash_msg" $ref_stash $w_commit
ret=$?
test $ret != 0 && test -z $quiet &&
@@
-259,7
+259,7
@@
save_stash () {
say "$(gettext "No local changes to save")"
exit 0
fi
say "$(gettext "No local changes to save")"
exit 0
fi
- test -f "$
GIT_DIR/logs/$ref_stash
" ||
+ test -f "$
(git rev-parse --git-path logs/$ref_stash)
" ||
clear_stash || die "$(gettext "Cannot initialize stash")"
create_stash "$stash_msg" $untracked
clear_stash || die "$(gettext "Cannot initialize stash")"
create_stash "$stash_msg" $untracked