← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~ilasc/launchpad:adjust-merge-instructions-ref-page into launchpad:master

 

Ioana Lasc has proposed merging ~ilasc/launchpad:adjust-merge-instructions-ref-page into launchpad:master.

Commit message:
Remove -f from git add remote command

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ilasc/launchpad/+git/launchpad/+merge/393608

Removing -f from git add remote command on GitRef Page as we are covered by git remote update.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ilasc/launchpad:adjust-merge-instructions-ref-page into launchpad:master.
diff --git a/lib/lp/code/browser/tests/test_gitref.py b/lib/lp/code/browser/tests/test_gitref.py
index 3fc6efa..28f3512 100644
--- a/lib/lp/code/browser/tests/test_gitref.py
+++ b/lib/lp/code/browser/tests/test_gitref.py
@@ -283,7 +283,7 @@ class TestGitRefView(BrowserTestCase):
             soupmatchers.Tag(
                 'Git remote add text', 'tt',
                 attrs={"id": "remote-add"},
-                text=("git remote add -f %s "
+                text=("git remote add %s "
                       "git+ssh://%s@xxxxxxxxxxxxxxxxxx/~%s/+git/%s"
                       ) % (self.user.name,
                            self.user.name,
@@ -328,7 +328,7 @@ class TestGitRefView(BrowserTestCase):
             soupmatchers.Tag(
                 'Git remote add text', 'tt',
                 attrs={"id": "remote-add"},
-                text=("git remote add -f %s "
+                text=("git remote add %s "
                       "git+ssh://%s@xxxxxxxxxxxxxxxxxx/%s/+source/%s"
                       ) % (eric.name,
                            self.user.name,
@@ -370,7 +370,7 @@ class TestGitRefView(BrowserTestCase):
             soupmatchers.Tag(
                 'Git remote add text', 'tt',
                 attrs={"id": "remote-add"},
-                text=("git remote add -f %s git+ssh://%s@xxxxxxxxxxxxxxxxxx/%s"
+                text=("git remote add %s git+ssh://%s@xxxxxxxxxxxxxxxxxx/%s"
                       % (eric.name,
                          self.user.name,
                          fooix.name))))
diff --git a/lib/lp/code/templates/git-macros.pt b/lib/lp/code/templates/git-macros.pt
index e5c21ad..0c93657 100644
--- a/lib/lp/code/templates/git-macros.pt
+++ b/lib/lp/code/templates/git-macros.pt
@@ -39,7 +39,7 @@
   <div id="merge-instructions" tal:condition="python:kind == 'branch' and view.user">
     <dt>Merge guidelines:</dt>
     <dd>
-      <tt id="remote-add" class="command" tal:content="string:git remote add -f ${context/repository/owner/name} ${view/git_ssh_url}" />
+      <tt id="remote-add" class="command" tal:content="string:git remote add ${context/repository/owner/name} ${view/git_ssh_url}" />
       <br />
       <tt id="remote-update" class="command" tal:content="string:git remote update ${context/repository/owner/name}" />
       <br />