diff options
author | Jens Lehmann <Jens.Lehmann@web.de> | 2010-04-10 19:01:12 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-04-10 11:51:56 -0700 |
commit | eee49b6ce4b7b3fed28794676c67ad3609f658ac (patch) | |
tree | ec4ee07b1434745d84e28b3d73095ee9a652fcde /builtin/archive.c | |
parent | git status: ignoring untracked files must apply to submodules too (diff) | |
download | tgif-eee49b6ce4b7b3fed28794676c67ad3609f658ac.tar.xz |
Teach diff --submodule and status to handle .git files in submodules
The simple test for an existing .git directory gives an incorrect result
if .git is a file that records "gitdir: overthere". So for submodules that
use a .git file, "git status" and the diff family - when the "--submodule"
option is given - did assume the submodule was not populated at all when
a .git file was used, thus generating wrong output or no output at all.
This is fixed by using read_gitfile_gently() to get the correct location
of the .git directory. While at it, is_submodule_modified() was cleaned up
to use the "dir" member of "struct child_process" instead of setting the
GIT_WORK_TREE and GIT_DIR environment variables.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/archive.c')
0 files changed, 0 insertions, 0 deletions