talisman
talisman copied to clipboard
error when push fails due to changes on remote
When another change has been made on the remote I'm pushing to (requiring a git pull
) talisman fails in quite an ugly way:
FATA[0000] Command execution failed error=exit status 128 output=
error: failed to push some refs to '[email protected]:jacksingleton/push-test.git'
@aaquibzama-tw @vhasus This is still reproducible. Any possible solutions for this?
@svishwanath-tw are you looking into this issue? If not, could you please un-assign yourself?
Can anyone add steps to reproduce this? I would like to try a hand at fixing this.
@jpninanjohn
Steps to reproduce:
- Ensure you do not have Talisman installed.
- On an existing git repo, make some changes on the github remote repo directly (or get another collaborator to make some changes)
- On your local machine, without taking a pull, try to push. You will see the error as :
! [rejected] master -> master (fetch first) error: failed to push some refs to '[email protected]:user1/somerepo.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
- Now install Talisman as a pre-push hook
- Repeat step 2.
- On your local machine, without taking a pull, try to push. Now the error you will see is the uglier one:
FATA[0000] Git command execution failed command=git diff da142d5ef07cc44c967e791279c05c16c1018..d731f1bfdaad1eadc8a5d069d11e8c9de0db9a --name-only --diff-filter=ACM dir=/some/somrepo error=exit status 128 output=fatal: Invalid revision range da142d5ef07cc44c967e791279c05c16c1018..d731f1bfdaad1eadc8a5d069d11e8c9de0db9a error: failed to push some refs to '[email protected]:user1/somerepo.git'