Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The commit function does not work when you have user.email but no user.name defined #79

Closed
alistaircarscadden opened this issue May 20, 2020 · 7 comments · Fixed by #155
Labels
enhancement New feature or request

Comments

@alistaircarscadden
Copy link
Contributor

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.

@extrawurst extrawurst added the enhancement New feature or request label May 20, 2020
@extrawurst
Copy link
Owner

followup to #74

@extrawurst extrawurst added the good first issue Good for newcomers label Jun 18, 2020
extrawurst pushed a commit that referenced this issue Jun 28, 2020
@extrawurst
Copy link
Owner

unfortunately #155 had to be rolled back

@extrawurst extrawurst reopened this Jun 29, 2020
@extrawurst extrawurst removed the good first issue Good for newcomers label Jun 29, 2020
@extrawurst
Copy link
Owner

removed good first issue since #155 showed that writing an appropriate unittest for this is by far more complicated than expected

@stale
Copy link

stale bot commented Nov 27, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Nov 27, 2020
@stale stale bot closed this as completed Dec 4, 2020
@extrawurst
Copy link
Owner

still active: #269

@extrawurst extrawurst reopened this Feb 3, 2021
@stale stale bot removed the wontfix This will not be worked on label Feb 3, 2021
@extrawurst
Copy link
Owner

@cruessler is this fixed by your PR?

@extrawurst
Copy link
Owner

@alistaircarscadden @cruessler closing this hoping that #269 actually fixed this. please reopen if this is not the case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants