Skip to content

Commit

Permalink
*.sh: respect $GIT_INDEX_FILE
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 557bd83 commit c697b57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion git-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ test true = "$rebase" && {
if ! git rev-parse -q --verify HEAD >/dev/null
then
# On an unborn branch
if test -f "$GIT_DIR/index"
if test -f "$(git rev-parse --git-path index)"
then
die "$(gettext "updating an unborn branch with changes added to the index")"
fi
Expand Down
2 changes: 1 addition & 1 deletion git-stash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ require_work_tree
cd_to_toplevel

TMP="$GIT_DIR/.git-stash.$$"
TMPindex=${GIT_INDEX_FILE-"$GIT_DIR/index"}.stash.$$
TMPindex=${GIT_INDEX_FILE-"$(git rev-parse --git-path index)"}.stash.$$
trap 'rm -f "$TMP-"* "$TMPindex"' 0

ref_stash=refs/stash
Expand Down

0 comments on commit c697b57

Please sign in to comment.