]> granicus.if.org Git - git/commitdiff
*.sh: respect $GIT_INDEX_FILE
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 30 Nov 2014 08:24:32 +0000 (15:24 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Dec 2014 19:00:12 +0000 (11:00 -0800)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-pull.sh
git-stash.sh

index 4d4fc77b05648c7d2d76ae932b7d68cdf411d364..ad442264cbae0003dc548b85769cbeb2107c7d5f 100755 (executable)
@@ -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
index d4cf818be9488f1b94fdf4766a8f73db6bfd1029..b6d4b06c5f9ab00c4b9708b9fe310a6b266ab663 100755 (executable)
@@ -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