Skip to content

Commit

Permalink
git-stash: avoid hardcoding $GIT_DIR/logs/....
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Dec 1, 2014
1 parent b849b95 commit 337959b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-stash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ store_stash () {
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 &&
Expand Down Expand Up @@ -259,7 +259,7 @@ save_stash () {
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
Expand Down

0 comments on commit 337959b

Please sign in to comment.