diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-11-10 18:02:16 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-11-10 18:02:16 +0900 |
commit | 57b530125e022de79f5f0b208bc0a5ee67c18b77 (patch) | |
tree | b6eaafd7b203b0886aa44d3a299823cbd2eeb933 /git-legacy-stash.sh | |
parent | Merge branch 'pb/pretty-email-without-domain-part' (diff) | |
parent | stash: handle staged changes in skip-worktree files correctly (diff) | |
download | tgif-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-x | git-legacy-stash.sh | 3 |
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" ) ) || |