diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-29 13:25:06 +0000 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-10-31 13:02:23 +0100 |
commit | 38039e3ace0ef2a474cca264f045d9518d6a49d0 (patch) | |
tree | 86d130d0920b22f3f15080ecdf774b8a73ecd3b6 | |
parent | 8c8af7b66183538937ec44c1ff974b7ab7bf0633 (diff) | |
download | gitlab-ce-38039e3ace0ef2a474cca264f045d9518d6a49d0.tar.gz |
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
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | app/models/repository.rb | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index 347e5ddec37..0f42d26edb7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ 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 diff --git a/app/models/repository.rb b/app/models/repository.rb index 0808896fd87..b50a0070a21 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -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 |