*.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>

Nguyễn Thái Ngọc Duy committed Nov 30, 2014 at 15:24 UTC c697b577a28ba8360314e09bc3d66c6c80043b3c
2 files changed +2 -2
git-pull.sh
+1 -1
@@ -240,7 +240,7 @@ test true = "$rebase" && {
240 if ! git rev-parse -q --verify HEAD >/dev/null
241 then
242 # On an unborn branch
243 - if test -f "$GIT_DIR/index"
243 + if test -f "$(git rev-parse --git-path index)"
244 then
245 die "$(gettext "updating an unborn branch with changes added to the index")"
246 fi
git-stash.sh
+1 -1
@@ -20,7 +20,7 @@ require_work_tree
20 cd_to_toplevel
21
22 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.$$
24 trap 'rm -f "$TMP-"* "$TMPindex"' 0
25
26 ref_stash=refs/stash