vn971 / rua

Build tool for Arch Linux providing control, review and jailed build options
GNU General Public License v3.0
424 stars 42 forks source link

fatal: unable to auto-detect email address (got 'refaelsh@arch.(none)') #143

Closed refaelsh closed 3 years ago

refaelsh commented 3 years ago

Here is what I get when trying to upgrade a package:

Package Current   Latest
rua     0.17.15-1 0.17.16-1

Do you wish to upgrade them? [O]=ok, [X]=exit. o

Reviewing "/home/refaelsh/.config/rua/pkg/rua".
[D]=view upstream changes since your last review, [M]=accept/merge upstream changes, [S]=(shellcheck not available until you merge), [T]=run shell to edit/inspect, [O]=(cannot use the package until you merge) m
Committer identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'refaelsh@arch.(none)')

Reviewing "/home/refaelsh/.config/rua/pkg/rua".
[D]=view upstream changes since your last review, [M]=accept/merge upstream changes, [S]=(shellcheck not available until you merge), [T]=run shell to edit/inspect, [O]=(cannot use the package until you merge)

Here is the output of git config --list:

color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
color.ui=true
rebase.autosquash=true
color.status.branch=magenta
color.status.untracked=cyan
color.status.unmerged=yellow
user.name=Refael Sheinker
user.email=refaelsh@protonmail.com
alias.lg=log --date-order --color-moved --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n''          %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
alias.lg1=log --date-order --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset) %C(bold green)%aD%C(reset)' --all
alias.st=status
alias.dif=diff --color-moved
alias.show=show --color-moved
alias.ch=checkout
merge.ff=no
merge.tool=kdiff3
pull.rebase=false

Please advise.

vn971 commented 3 years ago

@refaelsh hey, thanks for the report! Looking into it

vn971 commented 3 years ago

I think I know the reason. I'll think how to fix it now.

Just in case you're curious, the background is this. To have reproducible behavior in rua, I've made it run git in a way that it ignores local configuration. This makes sense if rua itself wants to specify the exact behaviour/workflow that it needs. The problem starts, however, with non-fast-forward merges. You probably have local modifications in rua repo, and therefore you have to make a real commit to proceed. But git commit cannot be made without an author and email. What I'll do is I'll plug some "default" value when rua initiates a merge commit.

vn971 commented 3 years ago

Fixed. Any commit initiated by RUA will now have a default name/email (also signalling that it was an automated action, not something that you really wrote).

To fix it locally for you, please jump to console before merge ([T]=run shell to edit/inspect), do a merge manually git merge upstream/master, log out of the console with logout and proceed normally. Sorry for the inconvenience...

refaelsh commented 3 years ago

That solved the issue. Thank you very much.