git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] branch: -r -d(D) should say "remote-tracking branch"

From
Danny Lin <danny0838@gmail.com>
Date
May 6, 2015, 19:01 UTC
Message-ID
<CAMbsUu4iAD0kGh_ZzbLBS4P69Hz-T4Mv0krLst+M7SVc=v=Dog@mail.gmail.com>
In-Reply-To
<xmqq4mnpvbgt.fsf@gitster.dls.corp.google.com>

git branch -r -d(D) currently says "delete remote branch", which should be "remote-tracking branch".

Signed-off-by: Danny Lin <danny0838@gmail.com>
---
 builtin/branch.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index dc6f0b2..3560c51 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -242,7 +242,7 @@ static int delete_branches(int argc, const char
**argv, int force, int kinds,
                         sha1, &flags);
         if (!target) {
             error(remote_branch
-                  ? _("remote branch '%s' not found.")
+                  ? _("remote-tracking branch '%s' not found.")
                   : _("branch '%s' not found."), bname.buf);
             ret = 1;
             continue;
@@ -257,7 +257,7 @@ static int delete_branches(int argc, const char
**argv, int force, int kinds,

         if (delete_ref(name, sha1, REF_NODEREF)) {
             error(remote_branch
-                  ? _("Error deleting remote branch '%s'")
+                  ? _("Error deleting remote-tracking branch '%s'")
                   : _("Error deleting branch '%s'"),
                   bname.buf);
             ret = 1;
@@ -265,7 +265,7 @@ static int delete_branches(int argc, const char
**argv, int force, int kinds,
         }
         if (!quiet) {
             printf(remote_branch
-                   ? _("Deleted remote branch %s (was %s).\n")
+                   ? _("Deleted remote-tracking branch %s (was %s).\n")
                    : _("Deleted branch %s (was %s).\n"),
                    bname.buf,
                    (flags & REF_ISBROKEN) ? "broken"
-- 
2.3.7.windows.1



revised

2015-05-07 1:53 GMT+08:00 Junio C Hamano <gitster@pobox.com>:
> Ralf Thielow <ralf.thielow@gmail.com> writes:
>
>> Danny Lin <danny0838@gmail.com> wrote:
>>> git branch -r -d(D) currently says "delete remote branch",
>>> which should be "remote-tracking branch".
>>> ---
>>
>> No "Signed-off-by" line. (see Documentation/SubmittingPatches)
>>
>>>  builtin/branch.c | 6 +++---
>>>  po/bg.po         | 6 +++---
>>>  po/ca.po         | 6 +++---
>>>  po/de.po         | 6 +++---
>>>  po/fr.po         | 6 +++---
>>>  po/git.pot       | 6 +++---
>>>  po/it.po         | 6 +++---
>>>  po/pt_PT.po      | 6 +++---
>>>  po/sv.po         | 6 +++---
>>>  po/vi.po         | 6 +++---
>>>  po/zh_CN.po      | 6 +++---
>>>  11 files changed, 33 insertions(+), 33 deletions(-)
>>>
>>
>> You don't need to update messages within "po/*" as they're
>> updated by the l10n coordinator and translators.
>
> Thanks for pointing it out, but the language should be stronger; not
> "don't need to", but "you must not".
>
> Thanks.
>
>>> diff --git a/builtin/branch.c b/builtin/branch.c
>>> index dc6f0b2..3560c51 100644
>>> --- a/builtin/branch.c
>>> +++ b/builtin/branch.c
>>> @@ -242,7 +242,7 @@ static int delete_branches(int argc, const char
>>> **argv, int force, int kinds,
>>>                          sha1, &flags);
>>>          if (!target) {
>>>              error(remote_branch
>>> -                  ? _("remote branch '%s' not found.")
>>> +                  ? _("remote-tracking branch '%s' not found.")
>>>                    : _("branch '%s' not found."), bname.buf);
>>>              ret = 1;
>>>              continue;
>>> @@ -257,7 +257,7 @@ static int delete_branches(int argc, const char
>>> **argv, int force, int kinds,
>>>
>>>          if (delete_ref(name, sha1, REF_NODEREF)) {
>>>              error(remote_branch
>>> -                  ? _("Error deleting remote branch '%s'")
>>> +                  ? _("Error deleting remote-tracking branch '%s'")
>>>                    : _("Error deleting branch '%s'"),
>>>                    bname.buf);
>>>              ret = 1;
>>> @@ -265,7 +265,7 @@ static int delete_branches(int argc, const char
>>> **argv, int force, int kinds,
>>>          }
>>>          if (!quiet) {
>>>              printf(remote_branch
>>> -                   ? _("Deleted remote branch %s (was %s).\n")
>>> +                   ? _("Deleted remote-tracking branch %s (was %s).\n")
>>>                     : _("Deleted branch %s (was %s).\n"),
>>>                     bname.buf,
>>>                     (flags & REF_ISBROKEN) ? "broken"
>>
>> Looks good to me.
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 5 in “branch: -r -d(D) should say "remote-tracking branch"”
  1. branch: -r -d(D) should say "remote-tracking branch"Danny Lin, May 6, 2015
  2. Ralf ThielowMay 6, 2015
  3. Junio C HamanoMay 6, 2015
  4. Danny LinMay 6, 2015
  5. Junio C HamanoMay 6, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.