Hi,
I just uploaded a stable update for ruby-httpclient. Since the bullseye
branch was created, a new upstream release has been uploaded to sid,
thus upstream and pristine-tar had moved on. `gbp push` then fails like
this:
----------------8<----------------8<----------------8<-----------------
gbp:info: Tagging Debian package 2.8.3-3+deb11u1 as debian/2.8.3-3+deb11u1 in git
gbp:info: Pushing debian/2.8.3-3+deb11u1 to origin
gbp:info: Pushing upstream/2.8.3 to origin
gbp:info: Pushing refs/heads/debian/bullseye to origin:refs/heads/debian/bullseye
gbp:info: Pushing 0d9e030d58de2a5c9b64adc5ca1571f1aa1b81bc to origin:refs/heads/upstream
gbp:error: Error running git push: To salsa.debian.org:ruby-team/ruby-httpclient.git
! [rejected] 0d9e030d58de2a5c9b64adc5ca1571f1aa1b81bc -> upstream (non-fast-forward)
error: failed to push some refs to 'salsa.debian.org:ruby-team/ruby-httpclient.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and 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.
gbp:info: Pushing 6a9377d36b2e2247621033196efc88c36004e940 to origin:refs/heads/pristine-tar
gbp:error: Error running git push: To salsa.debian.org:ruby-team/ruby-httpclient.git
! [rejected] 6a9377d36b2e2247621033196efc88c36004e940 -> pristine-tar (non-fast-forward)
error: failed to push some refs to 'salsa.debian.org:ruby-team/ruby-httpclient.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and 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.
gbp:error: Failed to push some refs.
----------------8<----------------8<----------------8<-----------------
Looking at the case for the upstream branch, it's trying to push commit
0d9e030d58de2a5c9b64adc5ca1571f1aa1b81bc. That commit was already
present in the corresponding remote branch, but there was a newer
commit on top of that. The same situation happends with the pristine-tar
branch.
Maybe gbp push could detect that the corresponding upstream/pristine-tar
commits is are already present at the remote branch, and skip the push.