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

[Microproject v2] describe: do not translate --debug output

From
ABAntoni Borowski <antekborowski11@gmail.com>
Date
Oct 16, 2026, 18:54 UTC
Message-ID
<20261016185418.162998-1-antekborowski11@gmail.com>
In-Reply-To
<xmqqpkx9fq8o.fsf@gitster.g>

The --debug flag is aimed at developers debugging describe's search strategy, not at end users. Translating this output makes it harder to grep for known strings, compare logs across locales, or paste output into upstream bug reports written in English — all things developers routinely need to do.

transport-helper.c already follows this convention: its "Debug: ..." messages are plain C strings with no gettext wrapper.

Drop the _() wrapper from describe_commit()'s and describe()'s debug-only fprintf() calls accordingly, and prefix them with "Debug: " to match transport-helper.c's style.

Signed-off-by: Antoni Borowski <antekborowski11@gmail.com>
---
 builtin/describe.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/builtin/describe.c b/builtin/describe.c
index c0abc931a5..775f9f27f1 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -351,7 +351,7 @@ static void describe_commit(struct commit *cmit, struct strbuf *dst)
 	if (!max_candidates)
 		die(_("no tag exactly matches '%s'"), oid_to_hex(&cmit->object.oid));
 	if (debug)
-		fprintf(stderr, _("No exact match on refs or tags, searching to describe\n"));
+		fprintf(stderr, "Debug: No exact match on refs or tags, searching to describe\n");
 
 	if (!have_util) {
 		struct hashmap_iter iter;
@@ -419,7 +419,7 @@ static void describe_commit(struct commit *cmit, struct strbuf *dst)
 			}
 			if ((c->object.flags & best_within) == best_within) {
 				if (debug)
-					fprintf(stderr, _("finished search at %s\n"),
+					fprintf(stderr, "Debug: finished search at %s\n",
 						oid_to_hex(&c->object.oid));
 				break;
 			}
@@ -477,14 +477,14 @@ static void describe_commit(struct commit *cmit, struct strbuf *dst)
 		}
 		for (cur_match = 0; cur_match < match_cnt; cur_match++) {
 			struct possible_tag *t = &all_matches[cur_match];
-			fprintf(stderr, " %-*s %8d %s\n",
+			fprintf(stderr, "Debug:  %-*s %8d %s\n",
 				label_width, _(prio_names[t->name->prio]),
 				t->depth, t->name->path);
 		}
-		fprintf(stderr, _("traversed %lu commits\n"), seen_commits);
+		fprintf(stderr, "Debug: traversed %lu commits\n", seen_commits);
 		if (gave_up_on) {
 			fprintf(stderr,
-				_("found %i tags; gave up search at %s\n"),
+				"Debug: found %i tags; gave up search at %s\n",
 				max_candidates,
 				oid_to_hex(&gave_up_on->object.oid));
 		}
@@ -565,7 +565,7 @@ static void describe(const char *arg, int last_one)
 	struct strbuf sb = STRBUF_INIT;
 
 	if (debug)
-		fprintf(stderr, _("describe %s\n"), arg);
+		fprintf(stderr, "Debug: describe %s\n", arg);
 
 	if (repo_get_oid(the_repository, arg, &oid))
 		die(_("Not a valid object name %s"), arg);
-- 
2.56.0


---
v2: fixed commit message, no Q_() was actually touched
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 8 in “[Microproject] describe: pluralize tag/commit count messages”
  1. Antoni BorowskiOct 13, 2026
  2. Jeff KingOct 14, 2026
  3. Junio C HamanoOct 14, 2026
  4. [Microproject] describe: do not translate --debug outputAntoni Borowski, Oct 16, 2026
  5. Junio C HamanoOct 16, 2026
  6. [Microproject v2] describe: do not translate --debug outputAntoni Borowski, Oct 16, 2026
  7. Junio C HamanoNov 7, 2026
  8. Junio C HamanoNov 7, 2026

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.