summaryrefslogtreecommitdiff
path: root/builtin/stash.c
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 /builtin/stash.c
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 'builtin/stash.c')
-rw-r--r--builtin/stash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/stash.c b/builtin/stash.c
index 4e806176b0..d913487a43 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -1088,8 +1088,9 @@ static int stash_working_tree(struct stash_info *info, const struct pathspec *ps
}
cp_upd_index.git_cmd = 1;
- argv_array_pushl(&cp_upd_index.args, "update-index", "-z", "--add",
- "--remove", "--stdin", NULL);
+ argv_array_pushl(&cp_upd_index.args, "update-index",
+ "--ignore-skip-worktree-entries",
+ "-z", "--add", "--remove", "--stdin", NULL);
argv_array_pushf(&cp_upd_index.env_array, "GIT_INDEX_FILE=%s",
stash_index_path.buf);