• K
    Don't execute git hooks if you create branch as part of other change · a431ca0f
    Kamil Trzcinski 提交于
    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.
    a431ca0f
change_service.rb 2.2 KB