Take back control of git-hooks (aka The Great Migration) #108

Closed
opened 2025-11-02 03:09:08 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @bkcsoft on GitHub (Dec 3, 2016).

Originally assigned to: @bkcsoft on GitHub.

  • Gitea version (or commit ref): c8f300b
  • Git version: 2.10.2

This is in no way related to https://github.com/gogits/gogs/issues/1623 ...

Basically I wanna move most of the git-related callbacks into git-hooks, this would however break all existing support for custom git-hooks, but it will make it easier to implement features such as https://github.com/go-gitea/gitea/issues/302 https://github.com/go-gitea/gitea/issues/32 https://github.com/go-gitea/gitea/issues/8 and would fix https://github.com/go-gitea/gitea/issues/218 without actually having to fix it (since the bug is that Gitea have to duplicate the input-data to shove one down gits throat and the other into what is essentially .git/hooks/update 😒 )

thoughts?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39736071-take-back-control-of-git-hooks-aka-the-great-migration?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github).
Originally created by @bkcsoft on GitHub (Dec 3, 2016). Originally assigned to: @bkcsoft on GitHub. - Gitea version (or commit ref): c8f300b - Git version: 2.10.2 This is in no way related to https://github.com/gogits/gogs/issues/1623 ... Basically I wanna move most of the git-related callbacks into git-hooks, this would however break all existing support for custom git-hooks, but it will make it easier to implement features such as https://github.com/go-gitea/gitea/issues/302 https://github.com/go-gitea/gitea/issues/32 https://github.com/go-gitea/gitea/issues/8 and would fix https://github.com/go-gitea/gitea/issues/218 without actually having to fix it (since the bug is that Gitea have to duplicate the input-data to shove one down gits throat and the other into what is essentially `.git/hooks/update` 😒 ) thoughts? <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39736071-take-back-control-of-git-hooks-aka-the-great-migration?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github). </bountysource-plugin>
GiteaMirror added the type/proposaltype/refactoring labels 2025-11-02 03:09:08 -06:00
Author
Owner

@tboerger commented on GitHub (Dec 3, 2016):

I would also take the control of the hooks but that doesn't directly solve the mentioned issues :)

@tboerger commented on GitHub (Dec 3, 2016): I would also take the control of the hooks but that doesn't directly solve the mentioned issues :)
Author
Owner

@strk commented on GitHub (Dec 3, 2016):

Breaking existing deploys won't help adoption of Gitea, unless
automatic adaption of hooks is provided.

@strk commented on GitHub (Dec 3, 2016): Breaking existing deploys won't help adoption of Gitea, unless automatic adaption of hooks is provided.
Author
Owner

@tboerger commented on GitHub (Dec 3, 2016):

This is intended for 2.0.0 where breaking changes will be totally fine.

@tboerger commented on GitHub (Dec 3, 2016): This is intended for 2.0.0 where breaking changes will be totally fine.
Author
Owner

@tboerger commented on GitHub (Dec 4, 2016):

As this will introduce real breaking changes I have created and assigned the 2.x.x milestone.

@tboerger commented on GitHub (Dec 4, 2016): As this will introduce real breaking changes I have created and assigned the 2.x.x milestone.
Author
Owner

@bkcsoft commented on GitHub (Dec 5, 2016):

@strk possible migrations involve calling user provided hooks at the end of giteas hooks, which should be fairly easy to make a migration for 🙂

@tboerger it says "make it easier to implement" not "fix" 😛 the only thing it will automagically fix is #218 which only exists as a bug since we're not using git-hooks for what git-hooks was created for 😆

@bkcsoft commented on GitHub (Dec 5, 2016): @strk possible migrations involve calling user provided hooks at the end of giteas hooks, which should be fairly easy to make a migration for 🙂 @tboerger it says "make it easier to implement" not "fix" 😛 the only thing it will automagically fix is #218 which only exists as a bug since we're _not_ using git-hooks for what git-hooks was created for 😆
Author
Owner

@adymitruk commented on GitHub (Jan 30, 2017):

what's the workaround for getting a custom update hook? Add this to the repos' update hooks?

if [ -e hooks/update.custom ]; then bash hooks/update.custom "$@"; fi || exit
# the regular gitea line
@adymitruk commented on GitHub (Jan 30, 2017): what's the workaround for getting a custom update hook? Add this to the repos' update hooks? ``` if [ -e hooks/update.custom ]; then bash hooks/update.custom "$@"; fi || exit # the regular gitea line ```
Author
Owner

@lunny commented on GitHub (Feb 5, 2017):

I don't think this should be a v2.x.x issue. It should be fixed ASAP.

@lunny commented on GitHub (Feb 5, 2017): I don't think this should be a v2.x.x issue. It should be fixed ASAP.
Author
Owner

@bkcsoft commented on GitHub (Feb 6, 2017):

@lunny potential breakage, loads of migrations and backwards compatibility. In my book it belongs in a major-release 🙂

@bkcsoft commented on GitHub (Feb 6, 2017): @lunny potential breakage, loads of migrations and backwards compatibility. In my book it belongs in a major-release :slightly_smiling_face:
Author
Owner

@tboerger commented on GitHub (Feb 9, 2017):

Somebody can build a POC than we can see if it should work without breaking installations or not :)

@tboerger commented on GitHub (Feb 9, 2017): Somebody can build a POC than we can see if it should work without breaking installations or not :)
Author
Owner

@bkcsoft commented on GitHub (Feb 14, 2017):

I'll have a look at cherry-picking and correcting a few things from 039dc33367 during the weekend 🙂

@bkcsoft commented on GitHub (Feb 14, 2017): I'll have a look at cherry-picking and correcting a few things from https://github.com/gogits/gogs/commit/039dc333670a7ece5b34a611b794d072b589ec65 during the weekend 🙂
Author
Owner

@lunny commented on GitHub (Feb 23, 2017):

resolved by #1006

@lunny commented on GitHub (Feb 23, 2017): resolved by #1006
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#108