diff options
author | Stan Hu <stanhu@gmail.com> | 2015-07-20 16:40:24 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-07-20 16:40:24 +0000 |
commit | 3522018db3b6bb9f799e9326e109c6897c4a285e (patch) | |
tree | b0155100388d4382b0d309fa2d40fcc4ba3ed442 | |
parent | cb691f417db2961baf2d3a24ae2748288198a1b7 (diff) | |
parent | 374b95c38e2b178d0a0b006c41ed12cd272bdb9f (diff) | |
download | gitlab-ce-3522018db3b6bb9f799e9326e109c6897c4a285e.tar.gz |
Merge branch 'mr-fetch-command' into 'master'
merge_requests: add fetch command to the MR page
In our instance, users asked for an easy way to get the contents of the MR into their local clone. This adds a command line which can be used to fetch the contents of the MR.
Screenshot:

See merge request !678
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/views/projects/merge_requests/_show.html.haml | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG index e7844ad97ac..799856c91fa 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ v 7.14.0 (unreleased) - Set OmniAuth full_host parameter to ensure redirect URIs are correct (Stan Hu) - Expire Rails cache entries after two weeks to prevent endless Redis growth - Add support for destroying project milestones (Stan Hu) + - Add fetch command to the MR page. v 7.13.0 (unreleased) - Only enable HSTS header for HTTPS and port 443 (Stan Hu) diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml index b6d9b135c70..faaa85896cf 100644 --- a/app/views/projects/merge_requests/_show.html.haml +++ b/app/views/projects/merge_requests/_show.html.haml @@ -31,6 +31,16 @@ %li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch) %li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff) + - if @merge_request.open? and @merge_request.source_branch_exists? + .append-bottom-20 + .slead + %span + Fetch the branch with + %strong.label-branch< + git fetch + \ #{@merge_request.source_project.http_url_to_repo} + \ #{@merge_request.source_branch} + = render "projects/merge_requests/show/how_to_merge" = render "projects/merge_requests/widget/show.html.haml" |