path: root/builtin/merge-base.c
diff options
authorBrandon Williams <>2017-06-14 18:07:37 (GMT)
committerJunio C Hamano <>2017-06-15 19:56:22 (GMT)
commitd3fb71b3cb36971608a46744261e6b5f8802e784 (patch)
tree809de18f72641a2fd76a3ce00c5a7207a4afc3e9 /builtin/merge-base.c
parentb2141fc1d20e659810245ec6ca1c143c60e033ec (diff)
setup: teach discover_git_directory to respect the commondir
Currently 'discover_git_directory' only looks at the gitdir to determine if a git directory was discovered. This causes a problem in the event that the gitdir which was discovered was in fact a per-worktree git directory and not the common git directory. This is because the repository config, which is checked to verify the repository's format, is stored in the commondir and not in the per-worktree gitdir. Correct this behavior by checking the config stored in the commondir. It will also be of use for callers to have access to the commondir, so lets also return that upon successfully discovering a git directory. Signed-off-by: Brandon Williams <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/merge-base.c')
0 files changed, 0 insertions, 0 deletions