You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I configure a repository with a remote using that alias, as in:
git remote set-url origin me:git-bug-example
Then when I attempt to git bug push with this configuration, it fails with an error:
$ git bug push
Error: repository not found
It looks like git bug is performing git operations with something that doesn't parse git configuration files. Aliases like this can be expanded using the git remote get-url command:
Stepping through things with dlv debug, it looks like go-git isn't reading the global configuration: if I move the url configuration into .git/config, it seems to work as expected. That is, with the url configuration only in the global config, c.URLS is empty when we get to https://github.com/go-git/go-git/blob/master/config/config.go#L338; if I put the url configuration into .git/config, that variable gets populated as expected and insteadOf aliases are expanded.
The weird thing is that running git-bug under strace I can see that it's clearly reading the global configuration, so not entirely clear what's going on here.
This is probably a go-git issue, but to verify that I'll have to create a reproducer.
Those are two very different code path, as git-bug is reading the local+global config on its own. On the other hand when push/pull is done, it's pure go-git. It does look like a go-git bug.
I have
insteadOf
aliases in my git configuration, like this:If I configure a repository with a remote using that alias, as in:
Then when I attempt to
git bug push
with this configuration, it fails with an error:It looks like
git bug
is performing git operations with something that doesn't parse git configuration files. Aliases like this can be expanded using thegit remote get-url
command:The text was updated successfully, but these errors were encountered: