vn971 / rua

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

Non-fast-forward commit does not make sense into an empty head #132

Closed refaelsh closed 3 years ago

refaelsh commented 4 years ago

This is what I typed into my terminal:

rua install gitui

This is what I got:

Reviewing "/home/refaelsh/.config/rua/pkg/gitui".
[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
fatal: Non-fast-forward commit does not make sense into an empty head

What does this mean? Have I accidentally discovered a bug?

vn971 commented 4 years ago

Hi, thanks for the late reply. I've just tested rua install gitui, the "merge" action works for me.. Did you do any changes locally? Can you try deleting ~/.config/rua/pkg/gitui and see if the problem will persist?

refaelsh commented 4 years ago

Did you do any changes locally

No, I did not (this is the first time ever that I am installing gitui).

Can you try deleting ~/.config/rua/pkg/gitui and see if the problem will persist?

This did not help.

refaelsh commented 3 years ago

The same thing happens with the protonmail-bridge AUR package now.

vn971 commented 3 years ago

@refaelsh hey, it's interesting that for you the problem seems to be reproducible. I start to think that it's maybe a local git configuration that causes it. Since RUA aims at doing those commands silently by itself (when it can), one work-around would be to tell git to ignore local configuration files. I'll look how that can be done

vn971 commented 3 years ago

@refaelsh could you share your git config (or maybe parts thereof that look like having to do with pulling / merging) ? That could help with reproducibility. You can get it by running git config --list

vn971 commented 3 years ago

I've created an MR to fix it: https://github.com/vn971/rua/pull/141/files

Waiting for info from you to test it out

refaelsh commented 3 years ago

Here is the contents of my .gitconfig file:

[color]
    diff = auto
    status = auto
    branch = auto
    interactive = true
    ui = true

[rebase]
    autosquash = true   

[color "status"]
    branch = magenta
        untracked = cyan
        unmerged = yellow        
        #header = bold black 

[user]
    name = refaelsh
    email = refaelsh@gmail.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
    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
        st = status
    dif = diff --color-moved
    show = show --color-moved
    ch = checkout

[merge]
    ff = no
    tool = kdiff3
[pull]
    rebase = false
vn971 commented 3 years ago
[merge]
    ff = no

That's the one! If I add it to my local git config, I get the same behavior (erroring out). If I remove it, rua works as intended. I have to figure out how to fix the problem now.

vn971 commented 3 years ago

Finished & tested, should work! I'll create a release soon

refaelsh commented 3 years ago

Big Kudos!

refaelsh commented 3 years ago

I can confirm that it works. Again, thank you.