mirror of
https://github.com/go-gitea/gitea
synced 2025-12-07 13:28:25 +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:
co-authored by
wxiaoguang
Lunny Xiao
parent
508de3a58d
commit
815d267c80
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+2
@@ -0,0 +1,2 @@
|
||||
x•ŽK
|
||||
1]çÙÒéüAÄS¸ï$Í"32ooð®ŠWð òÞ{›!žæ`–˜JC%¡.˜$Ár]sѱe$ïmòâMƒ·)£÷±(O`ªbtlÐE[:;4–àHÐ1_û�”rayýáþl“é’÷~“ÊEL@cå€Xv…Mþã":µMÛƒG«_}À?Ý
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+2
@@ -0,0 +1,2 @@
|
||||
x•�1
|
||||
!ES{ŠéAwGGa 9EúQgW·Èí#¹AªÞû©ÕZ§/£‹€³Œ–p±ì(¤(�ó®óBhÈÛ¼&ᙟãÝ:pLY`ûÍãU†ð-µzŸÁ°ô†\µ×ZM:�†ü¡¨Êå€óxJ/ûG}:µ3
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+3
@@ -0,0 +1,3 @@
|
||||
x•ŽA
|
||||
Â0E]ç³$™L“ˆx•L2µ]´•�
|
||||
ÞÞê␍\}ø¼ÿøe[–¹:{êM’°õZ5bŠ8$¡–Ävž°fÉRÍ37];Ôˆìbt¡Ò úå3‡$‰,tXœ¨G“÷>m␍²”ªpýÅý1wÍ—²-7p�½£Ä„p¶ÉZs´Ç±®L̾¾´Íã¤åµLæëe@ó
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
x•’Ë®«FE3æ+zn%44æ!%Qxƒ�Û€s˜AÓ`8Øæëã{£Ì2IM¶j•ª´¥Údèûf²Ìý2�”‚"‡$§e‰¶
|
||||
-(â Ä!´ÝJ"åaŲ@•BaîùHo3 ŸVØòå<$�/)å$JøJD’B¡•H¤§˜ü{¾#ÈRRðûOù«nfšÿF†þOÀ‰
|
||||
âq[°�2„̇~ŒÍô¬Ô÷zjjðë�ÒLÛÅÀ·}prm¬Fqhþä`@Ø«¦ªš®ª¥Õ˜fî?3Ç[7г…ê¨Ð) ^™þuÿÖ¿,µ�Æl7©zÝÿr|&«Ou4�Ø9Ó:µÎQjôû·êÕ1x±õå6ÍQ‡÷ƒÀ%Áåtû‰sò¸íV‰|( V¿�,aL,ù«G~²Ç�¹‹�‹r¥ùûî@·`·Àþ$[! XËŠep©Œæ[8 oýä(›« k£Z´Î³yóeÐ¹ÙÆÄ«Y²¿kÖd€¯6•3¾;3ÜÔ RÔiÞ‹dYÓDk91V]/Cê#º¾&ÿêpo´Fáb¯‹¶}§¹ô¦òuW&]+m xaqdÜIõX¯þ3␍Žƒ3¶×ÆK’ÚÓI#Æi_ärgðñÁ�ôôõÄ©7�=ú`@[õŠ&AóṲ̂ÞLÖo–‹3~MÆóõü8MGtö²ï>ÄôŒx›¼vQ²(…�aÅÄWŸo"¡Ës±r‰z”°eÓÅ}å†QDñóÖ¨fK)ó˜mÆr>>•ª†¿‚†ÝÌš$ÇF8³x™␍Ä×^J�k{mczþI*²^ÆMb‡þ m¸6Š”M~h¹pÕÍ␍{¡¡±0€ö•]€?nUwgþÉ ‰�ÿJ ³Ð±©Þ<ó7Û2
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+3
@@ -0,0 +1,3 @@
|
||||
x•ŽA
|
||||
Â0E]ç³$™L“ˆx•L2µ]´•�
|
||||
ÞÞê␍\}ø¼ÿøe[–¹:{êM’°õZ5bŠ8$¡–Ävž°fÉRÍ37];Ôˆìbt¡Ò úå3‡$‰,tXœ¨G“÷>m␍²”ªpýÅý1wÍ—²-7p�½£Ä„p¶ÉZs´Ç±®L̾¾´Íã¤åµLæëe@ó
|
||||
Reference in New Issue
Block a user