-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move git update-server-info to hooks #12826
Conversation
Signed-off-by: Andrew Thornton <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #12826 +/- ##
=======================================
Coverage 42.62% 42.62%
=======================================
Files 672 672
Lines 73785 73784 -1
=======================================
+ Hits 31448 31449 +1
- Misses 37247 37250 +3
+ Partials 5090 5085 -5
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update-server-info is cheep to execute ...
Codecov Report
@@ Coverage Diff @@
## master #12826 +/- ##
==========================================
+ Coverage 42.41% 42.50% +0.08%
==========================================
Files 673 673
Lines 74114 74113 -1
==========================================
+ Hits 31436 31499 +63
+ Misses 37581 37491 -90
- Partials 5097 5123 +26
Continue to review full report at Codecov.
|
But HTTP protocol push will miss that update? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blocking per @lunny Question.
No it won't - http push always runs the hooks too. This is simply running update-server-info as part of post-receive (the modern equivalent of post-update where it is supposed to be run) |
As mentioned in #10133 - update-server-info doesn't really belong in the running gitea process but in the hook during its update.
This PR moves this call to the hook directly.
We should consider whether this git method is actually still necessary as
routers/repo/http.go:616:getInfoRefs
appears to run this command anyway.Signed-off-by: Andrew Thornton [email protected]