diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2019-10-04 05:30:59 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-06 09:04:56 +0900 |
commit | dfd557c9783433bd6273987982f0665d99e52df2 (patch) | |
tree | 3f667e1537920860737c4480be9282c10d7327d2 /column.c | |
parent | Git 2.23 (diff) | |
download | tgif-dfd557c9783433bd6273987982f0665d99e52df2.tar.xz |
stash apply: report status correctly even in a worktree's subdirectory
When Git wants to spawn a child Git process inside a worktree's
subdirectory while `GIT_DIR` is set, we need to take care of specifying
the work tree's top-level directory explicitly because it cannot be
discovered: the current directory is _not_ the top-level directory of
the work tree, and neither is it inside the parent directory of
`GIT_DIR`.
This fixes the problem where `git stash apply` would report pretty much
everything deleted or untracked when run inside a worktree's
subdirectory.
To make sure that we do not introduce the "reverse problem", i.e. when
`GIT_WORK_TREE` is defined but `GIT_DIR` is not, we simply make sure
that both are set.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'column.c')
0 files changed, 0 insertions, 0 deletions