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

[PATCH/RFC 0/5] status, commit: separate "# " from the translatable part of output

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Feb 26, 2011, 05:07 UTC
Message-ID
<20110226050723.GA27864@elie>
Hi,

This series makes wt-status and builtin-commit code a little less explicit about the '#' signs they produce in their output. The main goal is to make messages like

		"\n"
		"It looks like you may be committing a MERGE.\n"
		"If this is not correct, please remove the file\n"
		"	%s\n"
		"and try again.\n"
		""

safe to translate by getting rid of the functionally important initial # signs; a nice side effect is to make the source code a little easier # to read and change (for example if we want to use some other kind of formatting some day for "git status" output).

The first two patches (va_copy, strbuf_vaddf) are stolen from Jeff's GIT_TRACE_FACET series.

Thanks for your help and patience so far. I hope the series can be useful.

Jeff King (2):
  compat: provide a fallback va_copy definition
  strbuf: add strbuf_vaddf
Jonathan Nieder (3):
  wt-status: add helpers for printing wt-status lines
  commit: refer to commit template as s->fp
  commit, status: use status_printf{,_ln,_more} helpers
 builtin/commit.c  |   58 ++++++++++----------
 color.c           |    9 +++
 color.h           |    3 +
 compat/msvc.h     |    1 -
 fsck.c            |   14 +----
 git-compat-util.h |    4 +
 merge-recursive.c |   15 +-----
 strbuf.c          |   27 +++++----
 strbuf.h          |    2 +
 trace.c           |   32 ++---------
 wt-status.c       |  160 ++++++++++++++++++++++++++++++++++++++--------------
 wt-status.h       |    7 ++
 12 files changed, 195 insertions(+), 137 deletions(-)
Next: Jonathan Nieder
Message 1 of 8 in “status, commit: separate "# " from the translatable part of output”
  1. 0/5 status, commit: separate "# " from the translatable part of outputJonathan Nieder, Feb 26, 2011
  2. 1/5 compat: provide a fallback va_copy definitionJonathan Nieder, Feb 26, 2011
  3. 2/5 strbuf: add strbuf_vaddfJonathan Nieder, Feb 26, 2011
  4. 3/5 wt-status: add helpers for printing wt-status linesJonathan Nieder, Feb 26, 2011
  5. 4/5 commit: refer to commit template as s->fpJonathan Nieder, Feb 26, 2011
  6. 5/5 commit, status: use status_printf{,_ln,_more} helpersJonathan Nieder, Feb 26, 2011
  7. Junio C HamanoFeb 27, 2011
  8. Jonathan NiederFeb 27, 2011

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.