*.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>
This commit is contained in:
parent
557bd833bb
commit
c697b577a2
@ -240,7 +240,7 @@ test true = "$rebase" && {
|
|||||||
if ! git rev-parse -q --verify HEAD >/dev/null
|
if ! git rev-parse -q --verify HEAD >/dev/null
|
||||||
then
|
then
|
||||||
# On an unborn branch
|
# On an unborn branch
|
||||||
if test -f "$GIT_DIR/index"
|
if test -f "$(git rev-parse --git-path index)"
|
||||||
then
|
then
|
||||||
die "$(gettext "updating an unborn branch with changes added to the index")"
|
die "$(gettext "updating an unborn branch with changes added to the index")"
|
||||||
fi
|
fi
|
||||||
|
@ -20,7 +20,7 @@ require_work_tree
|
|||||||
cd_to_toplevel
|
cd_to_toplevel
|
||||||
|
|
||||||
TMP="$GIT_DIR/.git-stash.$$"
|
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
|
trap 'rm -f "$TMP-"* "$TMPindex"' 0
|
||||||
|
|
||||||
ref_stash=refs/stash
|
ref_stash=refs/stash
|
||||||
|
Loading…
Reference in New Issue
Block a user