diff options
author | Patrick Steinhardt <ps@pks.im> | 2019-06-13 19:10:22 +0200 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2019-06-15 09:34:21 +0200 |
commit | cf1a114ba029f57c3c42bd4e8c30565cac48ba90 (patch) | |
tree | 928475f55fc5719393a27cc2295b25ed231c00ea /tests/diff/blob.c | |
parent | 5d987f7d0378c04be5b25f8793b2d814fc1c6e5e (diff) | |
download | libgit2-cf1a114ba029f57c3c42bd4e8c30565cac48ba90.tar.gz |
config_file: do not include trailing '/' for "gitdir" conditionals
When evaluating "gitdir:" and "gitdir/i:" conditionals, we
currently compare the given pattern with the value of
`git_repository_path`. Thing is though that `git_repository_path`
returns the gitdir path with trailing '/', while we actually need
to match against the gitdir without it.
Fix this issue by stripping the trailing '/' previous to
matching. Add various tests to ensure we get this right.
Diffstat (limited to 'tests/diff/blob.c')
0 files changed, 0 insertions, 0 deletions