Closed xaviershay closed 10 years ago
Some remote repositories actively block git push --force
. Looks like you have commented on it here: https://answers.atlassian.com/questions/256607/how-to-disable-reject-force-push-plugin
I think this would require a checkbox in the UI to enable the force argument (off by default). What do you think?
I can't imagine why you would have that enabled on a mirrored repository though? In my mind, "mirror this repository" means the remote should be an exact copy of the current one. The only way to guarantee that is with force pushes.
Fair point.
v1.9.0 is available on the marketplace.
Late to the party, but I'm uncomfortable with --force being the default here, and the ramifications for failure.
Preventing local writes to the mirror target is ultimately the responsibility of whoever controls access to the remote repository, and we do have --force disabled on all repositories by default, as there's never a case where we want a forced push to be accepted.
@landonf, any interest in contributing a UI checkbox to enable/disable the --force argument?
Since @xaviershay had the need for a very large hammer, I agree with your original request to include a UI to enable it.
However, the horse has left the barn; unless you're comfortable rolling this change back, I'll take a look at putting together a patch.
The horse is roaming free, will need to release a new version to the Atlassian marketplace.
Preventing local writes to the mirror target is ultimately the responsibility of whoever controls access to the remote repository
In my experience with thousands of repos, some of them always get in a weird state. But if it works for you, seems like option to disable (or enable, w/e) makes sense.
there's never a case where we want a forced push to be accepted.
this is surprising to me. I can't imagine a development workflow that didn't allow force pushes. (or more technically: I can't imagine convincing an entire engineering team that they shouldn't use force pushes.)
In my experience with thousands of repos, some of them always get in a weird state. But if it works for you, seems like option to disable (or enable, w/e) makes sense.
Is that volunteering? :-)
I can't imagine a development workflow that didn't allow force pushes. (or more technically: I can't imagine convincing an entire engineering team that they shouldn't use force pushes.)
It depends on your engineering team and their notions of best practices, I imagine.
I got no idea how do a UI :/
and fwiw if you reverted this I'd just keep running my fork so nbd.
Can't think of any reason not to do this, and I was seeing some repositories fail to push.