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

git push exits with zero status when hg rejects push with error:abort #341

Open
riastradh opened this issue Dec 9, 2024 · 0 comments
Open

Comments

@riastradh
Copy link

Version: git-cinnabar at commit 9827742

Configure an hg repository with the reject_new_heads hook, and try to push a new head:

$ git push origin
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: error: pretxnclose.reject_new_heads hook failed: Changes on branch 'default' resulted in multiple heads
remote: transaction abort!
remote: rollback completed
ERROR Changes on branch 'default' resulted in multiple heads
To hg::...
 * [new branch]      branches/default/tip -> branches/default/tip
$ echo $?
0

And origin/branches/default/tip is updated as if the push had succeeded, even though hg log on the upstream repository shows it has not.

Expected result:

  1. nonzero exit status indicating that the push failed
  2. origin/branches/default/tip is not updated

Full reproducer pushreject.t attached.

riastradh pushed a commit to riastradh/git-cinnabar that referenced this issue Dec 9, 2024
This tests how git push to a remote hg repository reacts when hg
returns an ERROR:ABORT response.  Currently: by pretending the push
had succeeded.

glandium#341
riastradh pushed a commit to riastradh/git-cinnabar that referenced this issue Dec 9, 2024
riastradh pushed a commit to riastradh/git-cinnabar that referenced this issue Dec 15, 2024
riastradh pushed a commit to riastradh/git-cinnabar that referenced this issue Dec 15, 2024
riastradh pushed a commit to riastradh/git-cinnabar that referenced this issue Dec 18, 2024
riastradh pushed a commit to riastradh/git-cinnabar that referenced this issue Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant