Description
Describe the bug
In gitui v0.3.0 the commit function does not allow a commit to be made when the user has a user.email defined and no user.name defined.
It took me a while to discover that there is a difference between user.name being defined as empty (git config user.name ""
) and it being undefined (as in, git config --list
does not show the entry at all).
In the empty case, interestingly enough, git commit does not allow the commit to be made, likewise gitui does not allow it.
In the undefined case, git commit does allow the commit to be made (and I think it shows unknown
in that field in later git log
or git show
calls). This is where the gitui behaviour is different, as gitui does not allow a commit to be made with this message:
Status | Log
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
┌Unstaged Changes [1]──────┌Error──────────────────────────────────────────────────────────┐───────────────────────────┐
│ │commit failed: │ │
│ │git error:config value 'user.name' was not found; class=Config │ │
│ │(7); code=NotFound (-3) │ │
│ │ │ │
Expected behavior
gitui would allow a commit to be made and fill in unknown
as git commit does.