git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ralf Thielow <ralf.thielow@gmail.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, worldhello.net@gmail.com, pclouds@gmail.com,
	Ralf Thielow <ralf.thielow@gmail.com>
Subject: [PATCH 0/2] multiline prefixes on messages
Date: Fri,  7 Sep 2012 21:05:03 +0200	[thread overview]
Message-ID: <1347044705-17268-1-git-send-email-ralf.thielow@gmail.com> (raw)
In-Reply-To: <7vhar9ybgk.fsf@alter.siamese.dyndns.org>

This is a short implementation of an idea i have, based
on Junio's comment. It might not follows the coding style,
the comments can be adverse and so on...
Just want to know if it's the right direction.

This series introduces a function that allows to add
a prefix to multilined messages. The function itself
is an extraction of the code of "advice.c::advice()".
Extract this as a separate function has the advantage
that we can mark these prefixes for translation and
can produce a nicer output.

Junio said that we should probably avoid memory
allocation on "die()" codepaths, but "warning"
messages are acceptable, I think. If the series is
basically acceptable, the "usage:" messages are also a
cancidate for migration to this.

Ralf Thielow (2):
  advice: extract function to print messages with prefix
  i18n: mark prefix "warning:" for translation

 advice.c | 14 ++++++++++----
 advice.h |  1 +
 usage.c  |  2 +-
 3 Dateien geändert, 12 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-)

-- 
1.7.12.176.g3fc0e4c.dirty

  reply	other threads:[~2012-09-07 19:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05 17:11 [PATCH/RFC] l10n: de.po: translate 2 new messages Ralf Thielow
2012-09-05 17:21 ` Ralf Thielow
2012-09-06 16:44 ` Thomas Rast
2012-09-06 17:15   ` Ralf Thielow
2012-09-07 10:31 ` Jiang Xin
2012-09-07 16:36   ` Ralf Thielow
2012-09-07 17:05     ` Ralf Thielow
2012-09-07 17:12       ` Ralf Thielow
2012-09-07 17:44       ` Junio C Hamano
2012-09-07 19:05         ` Ralf Thielow [this message]
2012-09-07 19:05           ` [PATCH 1/2] advice: extract function to print messages with prefix Ralf Thielow
2012-09-07 19:32             ` Junio C Hamano
2012-09-07 19:56               ` Ralf Thielow
2012-09-07 20:52                 ` Junio C Hamano
2012-09-07 21:09                   ` Ralf Thielow
2012-09-07 21:16                     ` Junio C Hamano
2012-09-07 21:20                       ` Junio C Hamano
2012-09-07 19:05           ` [PATCH 2/2] i18n: mark prefix "warning:" for translation Ralf Thielow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1347044705-17268-1-git-send-email-ralf.thielow@gmail.com \
    --to=ralf.thielow@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=worldhello.net@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).