Commit 38039e3a authored by Douwe Maan's avatar Douwe Maan Committed by Robert Speicher

Merge branch 'fix-issue-3138' into 'master'

Force update refs/merge-requests/X/head upon a push to the source branch of a merge request

If a user rebases and does a force push, GitLab would not update the `refs/merge-requests/X/head` link. Using the -f flag forces this to happen.

Closes #3138

See merge request !1683
parent 8c8af7b6
Please view this file on the master branch, on stable branches it's out of date.
v 8.1.3
- Force update refs/merge-requests/X/head upon a push to the source branch of a merge request (Stan Hu)
v 8.1.2
- Fix cloning Wiki repositories via HTTP (Stan Hu)
- Add migration to remove satellites directory
......
......@@ -512,7 +512,7 @@ class Repository
end
def fetch_ref(source_path, source_ref, target_ref)
args = %W(git fetch #{source_path} #{source_ref}:#{target_ref})
args = %W(git fetch -f #{source_path} #{source_ref}:#{target_ref})
Gitlab::Popen.popen(args, path_to_repo)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment