path: root/compat
diff options
authorJens Lehmann <>2010-04-10 17:01:12 (GMT)
committerJunio C Hamano <>2010-04-10 18:51:56 (GMT)
commiteee49b6ce4b7b3fed28794676c67ad3609f658ac (patch)
treeec4ee07b1434745d84e28b3d73095ee9a652fcde /compat
parent3bfc45047654c7dd38b32033321228e97fc8f60e (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'compat')
0 files changed, 0 insertions, 0 deletions