Skip to content
Snippets Groups Projects

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

Merged Kamil Trzciński requested to merge fix-git-hooks-when-creating-file into master
All threads resolved!
Compare and Show latest version
4 files
+ 31
15
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 11
0
@@ -988,6 +988,17 @@ def rename_repo
@@ -988,6 +988,17 @@ def rename_repo
Gitlab::UploadsTransfer.new.rename_project(path_was, path, namespace.path)
Gitlab::UploadsTransfer.new.rename_project(path_was, path, namespace.path)
end
end
 
def fetch_ref(source_project, branch_name, ref)
 
repository.fetch_ref(
 
source_project.repository.path_to_repo,
 
"refs/heads/#{ref}",
 
"refs/heads/#{branch_name}"
 
)
 
 
repository.after_create_branch
 
repository.find_branch(branch_name)
 
end
 
# Expires various caches before a project is renamed.
# Expires various caches before a project is renamed.
def expire_caches_before_rename(old_path)
def expire_caches_before_rename(old_path)
repo = Repository.new(old_path, self)
repo = Repository.new(old_path, self)
Loading