Open K900 opened 3 years ago
git-config
author here, we can definitely parse this information out of the config :)
Thanks for making us aware of this git-config feature!
As @edward-shen already clarified, it's not a problem of parsing but rather a problem of missing logic to further process certain git-config
capabilities. Currently all we do is to read the single repository .git/config
file and expecting the remote.url
to be set.
In future as the git-config
crate matures, I would expect this to be handled transparently or that additional utilities exist to make handling this case easier.
Yeah, so the problem (maybe? I'm guessing blind here) with that is the aliases are defined in the global ~/.gitconfig
, not the repo's .git/config
, so you now need two sources to resolve the URL correctly. That said, I might just poke it myself and see what happens this weekend.
That's one of two problems. The first one is the lack of a cascading config file interface at least for reading values, and the second is the lack of additional logic on top of certain 'special' configuration values, like file includes and…this one :D. Probably there are more.
That said, I might just poke it myself and see what happens this weekend.
Contributions are definitely welcome!
There's a somewhat lesser known feature in git where you can use aliases for your remote URLs by putting something like
And then use
git clone gh:Byron/gitoxide
instead of typing out the entire URL.As of 0.9, gitoxide fails to parse those remotes:
I'm not sure if gitoxide can parse
.gitconfig
files right now, so this might be tricky to handle correctly...