git-stash: avoid hardcoding $GIT_DIR/logs/....
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
b849b954d2
commit
337959b491
|
@ -184,7 +184,7 @@ store_stash () {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure the reflog for stash is kept.
|
# 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
|
git update-ref -m "$stash_msg" $ref_stash $w_commit
|
||||||
ret=$?
|
ret=$?
|
||||||
test $ret != 0 && test -z $quiet &&
|
test $ret != 0 && test -z $quiet &&
|
||||||
|
@ -259,7 +259,7 @@ save_stash () {
|
||||||
say "$(gettext "No local changes to save")"
|
say "$(gettext "No local changes to save")"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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")"
|
clear_stash || die "$(gettext "Cannot initialize stash")"
|
||||||
|
|
||||||
create_stash "$stash_msg" $untracked
|
create_stash "$stash_msg" $untracked
|
||||||
|
|
Loading…
Reference in New Issue