-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
agit flow hook refuses forced pushes #16679
Comments
@a1012112796 Maybe you can take a look. |
I think this is similar to the problem seen here #15373 (comment) I'm suspicious that might be some weird regression or interaction with #15629. |
oh bugger 🙈 |
Sorry, because can't get git push -o force-push=true ... ref: Line 39 in 23a87a0
|
@a1012112796 could you use https://github.com/go-gitea/gitea/blob/main/modules/repository/push.go#L101 to detect it? |
They are same, ref: Lines 206 to 223 in 23a87a0
I means to check if user make sure they want to force push, like the usage of |
Gitea version (or commit ref):
Gitea version 1.16.0+dev-96-gf1a810e09 built with GNU Make 4.3, go1.16.7 : netgo, osusergo, bindata, sqlite, sqlite_unlock_notify
Git version:
2.33.0.rc0.290.g2c90b51f76
Operating system:
Arch Linux
Built from:
source
Run with:
systemd
Database:
Can you reproduce the bug at https://try.gitea.io:
Log gist:
Description
First off, I appreciate this feature (implemented recently in #14295), it is really handy (I didn't know about agit flow before btw).
I have run into an issue when force pushing an update into a PR while doing this agit flow stuff (after initially opening the PR using this method).
The force push was then refused by Gitea (a git hook).
The command used was
git push --force HEAD:refs/for/whatever-the-branch-was -o topic=topic-name
if I recall correctly.EDIT: this was a typo here, I meant to say I pushed the
HEAD
ref, not "HEADS
".Note that
I cannot tell whether that is intended behaviour or not, i.e. whether I even ought to try to force push in agit flow or not.
The text was updated successfully, but these errors were encountered: