Go through the usages of Repository#after_create_branch and correct if nescessary
I see that the GitGarbageCollectWorker
is currently calling Repository#after_create_branch
, while it should be calling expire_branches_cache
, which would incorrectly track a repository_event
.
The following discussion from gitlab-ce!31653 should be addressed:
-
@patrickbajao started a discussion: (+2 comments) Needed to add this flag for both
after_create_branch
andafter_remove_branch
as they're also being used outside the context ofPostReceive
. I'm not sure if removing calls forexpire_branches_cache
will break the behavior of those so I decided to have it conditional and can be disabled by the consumer (which can be seen inGit::BranchHooksService
).