mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fix verifyCommits error when push a new branch (#26664)
> ### Description > If a new branch is pushed, and the repository has a rule that would require signed commits for the new branch, the commit is rejected with a 500 error regardless of whether it's signed. > > When pushing a new branch, the "old" commit is the empty ID (0000000000000000000000000000000000000000). verifyCommits has no provision for this and passes an invalid commit range to git rev-list. Prior to 1.19 this wasn't an issue because only pre-existing individual branches could be protected. > > I was able to reproduce with [try.gitea.io/CraigTest/test](https://try.gitea.io/CraigTest/test), which is set up with a blanket rule to require commits on all branches. Fix #25565 Very thanks to @Craig-Holmquist-NTI for reporting the bug and suggesting an valid solution! --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
x<01><>K
|
||||
1]<5D><14><0B><><EFBFBD>A<EFBFBD>S<EFBFBD><53>$<1D>"32oo<6F><06><>W<EFBFBD><57><EFBFBD><EFBFBD>{<7B>!<21><>`<60><>JC%<25>.<2E>$<07>r]sѱe$<24>m<EFBFBD><6D>M<EFBFBD><4D>)<29><><EFBFBD>(O`<60>btl<>E[:;4<12><>H<>1_<31><5F><EFBFBD>ray<61><79><EFBFBD>l<EFBFBD><6C><EFBFBD><EFBFBD>~<7E><>E<EFBFBD>L@c<><02>Xv<58>M<EFBFBD><4D>":<3A>MۃG<DB83>_}<7D>?<3F>
|
Reference in New Issue
Block a user