Skip to content

Commit c697b57

Browse files
pcloudsgitster
authored andcommitted
*.sh: respect $GIT_INDEX_FILE
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 557bd83 commit c697b57

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

git-pull.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ test true = "$rebase" && {
240240
if ! git rev-parse -q --verify HEAD >/dev/null
241241
then
242242
# On an unborn branch
243-
if test -f "$GIT_DIR/index"
243+
if test -f "$(git rev-parse --git-path index)"
244244
then
245245
die "$(gettext "updating an unborn branch with changes added to the index")"
246246
fi

git-stash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ require_work_tree
2020
cd_to_toplevel
2121

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

2626
ref_stash=refs/stash

0 commit comments

Comments
 (0)