summaryrefslogtreecommitdiff
path: root/Documentation/config.txt
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-05-16 08:28:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-17 01:32:26 (GMT)
commit0624c63ce6a488d3d8bccc4b1e79cc2093e2c4a4 (patch)
treeb78c1b9da859d05fad22c9ee4877bc050a727ee3 /Documentation/config.txt
parentc9672ba4c86a5fb18ea20d1c4a2c0eb6a731f3cb (diff)
downloadgit-0624c63ce6a488d3d8bccc4b1e79cc2093e2c4a4.zip
git-0624c63ce6a488d3d8bccc4b1e79cc2093e2c4a4.tar.gz
git-0624c63ce6a488d3d8bccc4b1e79cc2093e2c4a4.tar.bz2
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>
Diffstat (limited to 'Documentation/config.txt')
-rw-r--r--Documentation/config.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 475e874..302b8af 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -140,6 +140,16 @@ A few more notes on matching via `gitdir` and `gitdir/i`:
* Symlinks in `$GIT_DIR` are not resolved before matching.
+ * Both the symlink & realpath versions of paths will be matched
+ outside of `$GIT_DIR`. E.g. if ~/git is a symlink to
+ /mnt/storage/git, both `gitdir:~/git` and `gitdir:/mnt/storage/git`
+ will match.
++
+This was not the case in the initial release of this feature in
+v2.13.0, which only matched the realpath version. Configuration that
+wants to be compatible with the initial release of this feature needs
+to either specify only the realpath version, or both versions.
+
* Note that "../" is not special and will match literally, which is
unlikely what you want.