Merge branch 'fk/doc-format-patch-vn' into maint
[gitweb.git] / builtin / branch.c
index dc6f0b266c9cf621486b9dba111c2e7b37d3bc1b..a0a03fc6debdc2c230c5392072333448fc7c4280 100644 (file)
 #include "wt-status.h"
 
 static const char * const builtin_branch_usage[] = {
-       N_("git branch [options] [-r | -a] [--merged | --no-merged]"),
-       N_("git branch [options] [-l] [-f] <branchname> [<start-point>]"),
-       N_("git branch [options] [-r] (-d | -D) <branchname>..."),
-       N_("git branch [options] (-m | -M) [<oldbranch>] <newbranch>"),
+       N_("git branch [<options>] [-r | -a] [--merged | --no-merged]"),
+       N_("git branch [<options>] [-l] [-f] <branch-name> [<start-point>]"),
+       N_("git branch [<options>] [-r] (-d | -D) <branch-name>..."),
+       N_("git branch [<options>] (-m | -M) [<old-branch>] <new-branch>"),
        NULL
 };
 
@@ -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"
@@ -589,9 +589,16 @@ static char *get_head_description(void)
        else if (state.bisect_in_progress)
                strbuf_addf(&desc, _("(no branch, bisect started on %s)"),
                            state.branch);
-       else if (state.detached_from)
-               strbuf_addf(&desc, _("(detached from %s)"),
-                           state.detached_from);
+       else if (state.detached_from) {
+               /* TRANSLATORS: make sure these match _("HEAD detached at ")
+                  and _("HEAD detached from ") in wt-status.c */
+               if (state.detached_at)
+                       strbuf_addf(&desc, _("(HEAD detached at %s)"),
+                               state.detached_from);
+               else
+                       strbuf_addf(&desc, _("(HEAD detached from %s)"),
+                               state.detached_from);
+       }
        else
                strbuf_addstr(&desc, _("(no branch)"));
        free(state.branch);