diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2017-04-05 13:24:39 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-15 09:51:38 +0300 |
commit | 86f951570839e241cfa8effbe195674193693a7f (patch) | |
tree | 06d97d0363a93e18dc2185937331ca522cb4a35b /credential-cache.c | |
parent | 4aad2f1627bb74948874c0f31e8ce256bf236aa6 (diff) |
config: resolve symlinks in conditional include's patterns
$GIT_DIR returned by get_git_dir() is normalized, with all symlinks
resolved (see setup_work_tree function). In order to match paths (or
patterns) against $GIT_DIR char-by-char, they have to be normalized
too. There is a note in config.txt about this, that the user need to
resolve symlinks by themselves if needed.
The problem is, we allow certain path expansion, '~/' and './', for
convenience and can't ask the user to resolve symlinks in these
expansions. Make sure the expanded paths have all symlinks resolved.
PS. The strbuf_realpath(&text, get_git_dir(), 1) is still needed because
get_git_dir() may return relative path.
Noticed-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'credential-cache.c')
0 files changed, 0 insertions, 0 deletions