Skip to content

agit flow hook refuses forced pushes #16679

Closed
@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf

Description

  • 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:

    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:

    • I have not tried yet, I don't see why it wouldn't work in a fresh repo like I tried it with...
  • Log gist:

    • TBD

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

  • branch protection has not been enabled in this particular instance,
  • repo hooks have been reinitialized as per the subject PR request (it was noted somewhere there).

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions