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

Allow for 'git push' retry + a bit of documentation, fixes #385 #430

Merged
merged 4 commits into from
Jul 25, 2023

Conversation

reinout
Copy link
Collaborator

@reinout reinout commented Jul 25, 2023

No description provided.

Copy link
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@mauritsvanrees mauritsvanrees merged commit e5e5e05 into master Jul 25, 2023
6 checks passed
@mauritsvanrees mauritsvanrees deleted the reinout-retry-push branch July 25, 2023 15:43
@mauritsvanrees
Copy link
Member

I released this in 9.0.0a3.

But here it erroneously thinks that something is wrong, when in fact the push goes fine:

OK to push commits to the server? (Y/n)? 
To github.com:zestsoftware/zest.releaser.git
5b7e2e1..fc443d8  master -> master
There were errors or warnings.
Perhaps the main branch is protected?
Retry this command? [Yes/no/quit/?]
INFO     Retrying command: 'git push'                                                                                                                                                                                                       
INFO     Retrying command: 'git push'                                                                                                                                                                                                       
Everything up-to-date
There were errors or warnings.
Retry this command? [Yes/no/quit/?]n
INFO     Everything up-to-date                                                                                                                                                                                                          
To github.com:zestsoftware/zest.releaser.git
* [new tag]         9.0.0a3 -> 9.0.0a3
There were errors or warnings.
Perhaps the main branch is protected?
Retry this command? [Yes/no/quit/?]n
INFO     To github.com:zestsoftware/zest.releaser.git                                                                                                                                                                                   
         * [new tag]         9.0.0a3 -> 9.0.0a3                                                                                                                                                                                         
INFO     Finished full release. 

The info returned by GitHub is interpreted as error or warning, presumably because it is printed to /dev/stderr even though they are not errors. Let me add a screen shot with colours for clarity:

Screenshot 2023-07-25 at 17 47 38

For clarity, what I do myself, is:

  • I let the command do a git push.
  • This shows an "error".
  • I retry.
  • git push says that everything is up-to-date.
  • I do not retry.
  • Then git push tags, showing an "error"
  • I do not retry.
  • The commits and new tag are on GitHub just fine.

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

Successfully merging this pull request may close these issues.

2 participants