File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,12 @@ func runHookUpdate(c *cli.Context) error {
285
285
}
286
286
287
287
func runHookPostReceive (c * cli.Context ) error {
288
+ // First of all run update-server-info no matter what
289
+ if _ , err := git .NewCommand ("update-server-info" ).Run (); err != nil {
290
+ return fmt .Errorf ("Failed to call 'git update-server-info': %v" , err )
291
+ }
292
+
293
+ // Now if we're an internal don't do anything else
288
294
if os .Getenv (models .EnvIsInternal ) == "true" {
289
295
return nil
290
296
}
Original file line number Diff line number Diff line change @@ -180,10 +180,6 @@ func pushUpdates(optsList []*PushUpdateOptions) error {
180
180
}
181
181
182
182
repoPath := repo .RepoPath ()
183
- _ , err = git .NewCommand ("update-server-info" ).RunInDir (repoPath )
184
- if err != nil {
185
- return fmt .Errorf ("Failed to call 'git update-server-info': %v" , err )
186
- }
187
183
gitRepo , err := git .OpenRepository (repoPath )
188
184
if err != nil {
189
185
return fmt .Errorf ("OpenRepository: %v" , err )
You can’t perform that action at this time.
0 commit comments