summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-stash.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-stash.sh b/git-stash.sh
index eac5551380..de13dd1812 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -58,11 +58,11 @@ save_stash () {
# state of the working tree
w_tree=$( (
+ rm -f "$TMP-index" &&
+ cp -p ${GIT_INDEX_FILE-"$GIT_DIR/index"} "$TMP-index" &&
GIT_INDEX_FILE="$TMP-index" &&
export GIT_INDEX_FILE &&
-
- rm -f "$TMP-index" &&
- git read-tree $i_tree &&
+ git read-tree -m $i_tree &&
git add -u &&
git write-tree &&
rm -f "$TMP-index"