#4851 Please allow non-fast-forward changes to webauthinfra git repos
Closed: Fixed None Opened 8 years ago by adelton.

= phenomenon =

Hello, I'd need to git push -f into webauthinfra/mod_lookup_identity git repo to fix broken commit, however I get

{{{
$ git push webauthinfra master:master -f
Total 0 (delta 0), reused 0 (delta 0)
remote: error: denying non-fast-forward refs/heads/master (you should pull first)
To ssh://adelton@git.fedorahosted.org/git/webauthinfra/mod_lookup_identity.git
! [remote rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://adelton@git.fedorahosted.org/git/webauthinfra/mod_lookup_identity.git'
}}}

= reason =

I assume the there is something about the git configuration which prevents the non-fast-forward push.

I've also tried to create and recreate the master branch but I get

{{{
remote: error: By default, deleting the current branch is denied, because the next
remote: error: 'git clone' won't result in any file checked out, causing confusion.
remote: error:
remote: error: You can set 'receive.denyDeleteCurrent' configuration variable to
remote: error: 'warn' or 'ignore' in the remote repository to allow deleting the
remote: error: current branch, with or without a warning message.
remote: error:
remote: error: To squelch this message, you can set it to 'refuse'.
remote: error: refusing to delete the current branch: refs/heads/master
To ssh://adelton@git.fedorahosted.org/git/webauthinfra/mod_lookup_identity.git
! [remote rejected] master (deletion of the current branch prohibited)
error: failed to push some refs to 'ssh://adelton@git.fedorahosted.org/git/webauthinfra/mod_lookup_identity.git'
}}}

= recommendation =

Either allow non-fast-forward pushes, or the receive.denyDeleteCurrent.

I'm aware that I shouldn't change what was publicly pushed but since i try to do that minutes after the original push, my hope is fixing it will not cause any disturbance.

I'd appreciate the change on the mod_authnz_pam and mod_intercept_form_submit git repos under webauthinfra as well.

Also, if I'm able to edit the repo options myself, I'd appreciate pointer to the way to do that.

Thank you,

Jan


We can set this for your project, but I want to make sure you realize what
this means.

If you push non fast forward commits to fix mistakes, it means other
people who may have cloned your repo could have commits no longer in your
repo. This could cause confusion and anguish. It's very hard to want to
contribute to a repo where it changes behind your back with non fast
forward commits.

If you still really would like this set, please indicate so.

Replying to [comment:2 kevin]:

We can set this for your project, but I want to make sure you realize what
this means.

If you push non fast forward commits to fix mistakes, it means other
people who may have cloned your repo could have commits no longer in your
repo. This could cause confusion and anguish. It's very hard to want to
contribute to a repo where it changes behind your back with non fast
forward commits.

If you still really would like this set, please indicate so.

Yes, I'm aware of the consequences. Please change the settings.

Done. (for all 3 of those repos).

Let us know if you need anything further...

Login to comment on this ticket.

Metadata