diff options
author | SZEDER Gábor <szeder@ira.uka.de> | 2009-01-16 16:37:33 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-17 21:46:50 -0800 |
commit | 72183cb297f614dc2df1c0ed08afac1be27ec35a (patch) | |
tree | 2c27182ec9b1be03b7b786cf92456b8436f7edfc /builtin.h | |
parent | Documentation: let asciidoc align related options (diff) | |
download | tgif-72183cb297f614dc2df1c0ed08afac1be27ec35a.tar.xz |
Fix gitdir detection when in subdir of gitdir
If the current working directory is a subdirectory of the gitdir (e.g.
<repo>/.git/refs/), then setup_git_directory_gently() will climb its
parent directories until it finds itself in a gitdir. However, no
matter how many parent directories it climbs, it sets
'GIT_DIR_ENVIRONMENT' to ".", which is obviously wrong.
This behaviour affected at least 'git rev-parse --git-dir' and hence
caused some errors in bash completion (e.g. customized command prompt
when on a detached head and completion of refs).
To fix this, we set the absolute path of the found gitdir instead.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin.h')
0 files changed, 0 insertions, 0 deletions