Skip to content
  • Ævar Arnfjörð Bjarmason's avatar
    config: match both symlink & realpath versions in IncludeIf.gitdir:* · 0624c63c
    Ævar Arnfjörð Bjarmason authored and Junio C Hamano's avatar Junio C Hamano committed
    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 3efd0bed ("config: add conditional include", 2017-03-01)
    2. commit 86f95157
    
     ("config: resolve symlinks in conditional
       include's patterns", 2017-04-05)
    
    Signed-off-by: default avatarÆvar Arnfjörð Bjarmason <avarab@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    0624c63c