gitui-org / gitui-org/gitui

user.name was not found for .gitconfig with includeIf

Open
#1,696 9 comments 1 reaction 0 assignees View on GitHub
upstream
Dominant language
Rust
Stars
22.5k
Forks
773
PR merge metrics
No merged PRs in 30d

Description

I use a [peculiar `.gitconfig` with numerous `includeIf`](https://github.com/mloskot/wsl-config/blob/ad480d54984259a1a28f58bb194b80a9869fc1aa/git/.gitconfig#L1-L14) directives and it works well with `git` and Fork and GitHub Desktop, as well as with `lazygit`:

```
$ git config --get user.name
Mateusz Łoskot
$ git config --get user.email
mateusz@loskot.net
```

I'm also using `export GPG_TTY=$(tty)` and signing my commits using terminal-based passphrase prompt.

I've just tried `gitui` on Ubuntu 22.04 and it seems tripping over my special Git configuration, complaining with:

```
commit error:
git error:config value 'user.name' was not found; class=Config (7); code=NotFound (-3)
```

I've searched around and I found this about `gitui` not using `git cli`, https://github.com/extrawurst/gitui/issues/74#issuecomment-631522799, so I assume it does not rely on `git`-native processing of `.gitconfig`. This may explain it may be tripping over `includeIf` indeed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.