diff options
| author | Junio C Hamano <gitster@pobox.com> | 2019-10-11 14:24:48 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-10-11 14:24:48 +0900 |
| commit | 66102cfad839135b89ec7e4ccd253c8d7ce627a7 (patch) | |
| tree | 4fe44505ed732e8199597c98a8ea6cbb7ab3679d /builtin | |
| parent | a4c5d9f66eaab94c874cd59584c0ede44b6e80bc (diff) | |
| parent | dfd557c9783433bd6273987982f0665d99e52df2 (diff) | |
| download | git-66102cfad839135b89ec7e4ccd253c8d7ce627a7.tar.xz | |
Merge branch 'js/stash-apply-in-secondary-worktree'
"git stash apply" in a subdirectory of a secondary worktree failed
to access the worktree correctly, which has been corrected.
* js/stash-apply-in-secondary-worktree:
stash apply: report status correctly even in a worktree's subdirectory
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/stash.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/stash.c b/builtin/stash.c index ab30d1e920..4fc44b35e4 100644 --- a/builtin/stash.c +++ b/builtin/stash.c @@ -497,6 +497,10 @@ static int do_apply_stash(const char *prefix, struct stash_info *info, */ cp.git_cmd = 1; cp.dir = prefix; + argv_array_pushf(&cp.env_array, GIT_WORK_TREE_ENVIRONMENT"=%s", + absolute_path(get_git_work_tree())); + argv_array_pushf(&cp.env_array, GIT_DIR_ENVIRONMENT"=%s", + absolute_path(get_git_dir())); argv_array_push(&cp.args, "status"); run_command(&cp); } |
