Error: no config entry for the given key: missing key user.name

Labels: area/git kind/bug priority/backlog

Timeline

Austin Ziegler (halostatue) opened

This is similar to #1139 in that the core issue is that I have configured git to support multiple identities (I only have one on my personal laptop, but multiple on my work laptop), but I have done so through includeIf blocks.

When I try to do git bug bridge new (or git bug user new) in a local repo, I get the error:

Error: no config entry for the given key: missing key user.name

git bug is correct that if it's reading my configuration without awareness of includeIf, I do not have anything set in [user]. However, running git config --get user.name returns the expected value.

I've already fixed an issue similar to #1474, but it appears that whatever git-config parsing is going on is (a) excessively strict and (b) fundamentally broken compared to the native git config parsing.

sudoforge commented

what you're experiencing is an unfortunate side-effect of our migration to go-git (probably the most popular git library in go), as it is not really feature-complete, and still (after many years) missing support for critical-stakes features like following include (and includeIf) directives.

thanks for opening this; we didn't have an issue open explicitly for includeIf directives.

support for following includes will need to be implemented manually, and is something top of mind.

sudoforge added label kind/bug

sudoforge added label priority/backlog

sudoforge added label area/git

sudoforge commented

note: this is actually most similar to #1402; where include.path directives are not being followed (same cause: the upstream library we use for git integration doesn't support it natively).