1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-09-19 01:35:59 -04:00
gitea/routers
Lunny Xiao df7f1c2ead
Fix protected branch files detection on pre_receive hook (#31778)
Fix #31738

When pushing a new branch, the old commit is zero. Most git commands
cannot recognize the zero commit id. To get the changed files in the
push, we need to get the first diverge commit of this branch. In most
situations, we could check commits one by one until one commit is
contained by another branch. Then we will think that commit is the
diverge point.

And in a pre-receive hook, this will be more difficult because all
commits haven't been merged and they actually stored in a temporary
place by git. So we need to bring some envs to let git know the commit
exist.
2024-08-06 13:32:49 +00:00
..
api Add signature support for the RPM module (#27069) 2024-08-06 09:03:33 -04:00
common Refactor route path normalization (#31381) 2024-06-17 23:28:47 +00:00
install Refactor names (#31405) 2024-06-19 06:32:45 +08:00
private Fix protected branch files detection on pre_receive hook (#31778) 2024-08-06 13:32:49 +00:00
utils Refactor external URL detection (#29973) 2024-03-22 04:32:40 +08:00
web Fix wiki revision pagination (#31760) 2024-08-03 18:35:55 +00:00
init.go Refactor names (#31405) 2024-06-19 06:32:45 +08:00