summaryrefslogtreecommitdiff
path: root/git-legacy-stash.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-11-10 18:02:16 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-11-10 18:02:16 +0900
commit57b530125e022de79f5f0b208bc0a5ee67c18b77 (patch)
treeb6eaafd7b203b0886aa44d3a299823cbd2eeb933 /git-legacy-stash.sh
parentMerge branch 'pb/pretty-email-without-domain-part' (diff)
parentstash: handle staged changes in skip-worktree files correctly (diff)
downloadtgif-57b530125e022de79f5f0b208bc0a5ee67c18b77.tar.xz
Merge branch 'js/update-index-ignore-removal-for-skip-worktree'
"git stash save" in a working tree that is sparsely checked out mistakenly removed paths that are outside the area of interest. * js/update-index-ignore-removal-for-skip-worktree: stash: handle staged changes in skip-worktree files correctly update-index: optionally leave skip-worktree entries alone
Diffstat (limited to 'git-legacy-stash.sh')
-rwxr-xr-xgit-legacy-stash.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-legacy-stash.sh b/git-legacy-stash.sh
index 07ad4a5459..53fa574301 100755
--- a/git-legacy-stash.sh
+++ b/git-legacy-stash.sh
@@ -193,7 +193,8 @@ create_stash () {
GIT_INDEX_FILE="$TMPindex" &&
export GIT_INDEX_FILE &&
git diff-index --name-only -z HEAD -- "$@" >"$TMP-stagenames" &&
- git update-index -z --add --remove --stdin <"$TMP-stagenames" &&
+ git update-index --ignore-skip-worktree-entries \
+ -z --add --remove --stdin <"$TMP-stagenames" &&
git write-tree &&
rm -f "$TMPindex"
) ) ||