git/builtin
Johannes Schindelin dfd557c978 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>
2019-10-06 09:04:56 +09:00
..
2019-07-09 15:25:44 -07:00
2019-07-19 11:30:20 -07:00
2019-07-09 15:25:34 -07:00
2019-07-25 13:59:22 -07:00
2019-01-29 12:47:54 -08:00
2019-04-25 16:41:12 +09:00
2019-05-19 16:45:35 +09:00
2018-10-19 13:34:02 +09:00
2019-08-02 09:55:03 -07:00
2019-07-19 11:30:23 -07:00
2019-05-13 14:22:54 +09:00
2019-01-18 13:49:52 -08:00
2019-07-29 12:39:14 -07:00
2019-07-19 11:30:21 -07:00
2019-07-25 13:59:24 -07:00
2018-05-29 00:28:22 +09:00
2019-06-19 08:19:21 -07:00