config: match both symlink & realpath versions in IncludeIf.gitdir:*
commit0624c63ce6a488d3d8bccc4b1e79cc2093e2c4a4
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 16 May 2017 08:28:46 +0000 (16 08:28 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 May 2017 01:32:26 +0000 (17 10:32 +0900)
treeb78c1b9da859d05fad22c9ee4877bc050a727ee3
parentc9672ba4c86a5fb18ea20d1c4a2c0eb6a731f3cb
config: match both symlink & realpath versions in IncludeIf.gitdir:*

Change the conditional inclusion mechanism to support
e.g. gitdir:~/git_tree/repo where ~/git_tree is a symlink to
/mnt/stuff/repo.

This worked in the initial version of this facility[1], but regressed
later in the series while solving a related bug[2].

Now gitdir: will match against the symlinked
path (e.g. gitdir:~/git_tree/repo) in addition to the current
/mnt/stuff/repo path.

Since this is already in a release version note in the documentation
that this behavior changed, so users who expect their configuration to
work on both v2.13.0 and some future version of git with this fix
aren't utterly confused.

1. commit 3efd0bedc6 ("config: add conditional include", 2017-03-01)
2. commit 86f9515708 ("config: resolve symlinks in conditional
   include's patterns", 2017-04-05)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt
config.c
t/t1305-config-include.sh