Skip to content
Snippets Groups Projects
Commit a431ca0f authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Don't execute git hooks if you create branch as part of other change

Currently, our procedure for adding a commit requires us to execute `CreateBranchService` before file creation.
It's OK, but also we do execute `git hooks` (the `PostReceive` sidekiq job) as part of this process.
However, this hook is execute before the file is actually committed, so the ref is updated.

Secondly, we do execute a `git hooks` after committing file and updating ref.
This results in duplicate `PostReceive` jobs, where the first one is completely invalid.

This change makes the branch creation, something that is intermediate step of bigger process (file creation or update, commit cherry pick or revert) to not execute git hooks.
parent b328c788
Branches
Tags
Loading
Pipeline #
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment