Support includeIf' `hasconfig:remote.*.url` condition
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 10.6k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction steps
I tested with the following in my git config:
# ~/.config/git/config
[includeIf "hasconfig:remote.*.url:https://github.com/libgit2/libgit2.git"]
path = ~/.config/git/libgit2.config
# ~/.config/git/libgit2.config
[foo]
bar = baz
Expected behavior
In a repository cloned from the specified remote, the config key foo.bar should have value baz.
$ git clone https://github.com/libgit2/libgit2.git
Cloning into 'libgit2'...
[...]
$ cd libgit2
$ git config foo.bar
baz
Actual behavior
Conditional include doesn't work, foo.bar has no value.
Version of libgit2 (release number or SHA1)
1.7.1 (through rust's git2 crate 0.18.0)
Operating system(s) tested
Linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the shown Git config, repository clone, and git config foo.bar commands. Then trace libgit2's conditional-include handling for hasconfig:remote.*.url and its remote URL lookup; no source file or test path is named in the report. Done means the include is applied for the matching remote and foo.bar returns baz.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, git
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100