Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-11-30 11:24:32 +0300
committerJunio C Hamano <gitster@pobox.com>2014-12-01 22:00:12 +0300
commitc697b577a28ba8360314e09bc3d66c6c80043b3c (patch)
treef1f2e44c8783048c82530a848dc142541f41d917
parent557bd833bb4e2bd1f109f6f911ab517b6ba3d27a (diff)
*.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>
-rwxr-xr-xgit-pull.sh2
-rwxr-xr-xgit-stash.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/git-pull.sh b/git-pull.sh
index 4d4fc77b05..ad442264cb 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -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
diff --git a/git-stash.sh b/git-stash.sh
index d4cf818be9..b6d4b06c5f 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -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