From: Johannes Sixt <j.sixt@viscovery.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
git@vger.kernel.org, Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: [PATCH] Add the --submodule-summary option to the diff option family
Date: Mon, 05 Oct 2009 08:18:48 +0200 [thread overview]
Message-ID: <4AC98FC8.3090202@viscovery.net> (raw)
In-Reply-To: <7vbpkmn6oi.fsf@alter.siamese.dyndns.org>
Junio C Hamano schrieb:
> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
>> + fwrite(sb.buf, sb.len, 1, f);
>> +
>> + if (!message) {
>> + while ((commit = get_revision(&rev))) {
>> + strbuf_setlen(&sb, 0);
>> + if (del)
>> + strbuf_addstr(&sb, commit->object.flags &
>> + SYMMETRIC_LEFT ? del : add);
>> + format_commit_message(commit, format, &sb,
>> + rev.date_mode);
>> + if (del)
>> + strbuf_addstr(&sb, reset);
>
> - In the "ANSI-terminal only" world view, adding colors to strbuf and
> writing it out together with the actual strings is an easy thing to do.
> Don't Windows folks have trouble converting this kind of code to their
> color control call that is separate from writing strings out? If it is
> not a problem, I do not have any objection to it, but otherwise I'd
> suggest not to add any more code that stores color escape sequence in
> strbuf, so that we would not make later conversion by Windows folks
> harder than necessary.
Thanks for noticing this! To store color escapes in strbuf is not a
problem as long as the string is finally written using printf, fprintf, or
fputs.
>> + strbuf_addch(&sb, '\n');
>> + fwrite(sb.buf, sb.len, 1, f);
Outch! fwrite doesn't interpret color escapes. AFAICS, this sequence is
easy to change such that it uses fprintf().
-- Hannes
next prev parent reply other threads:[~2009-10-05 6:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1254668669u.git.johannes.schindelin@gmx.de>
2009-10-04 15:05 ` [PATCH] Add the --submodule-summary option to the diff option family Johannes Schindelin
2009-10-04 22:19 ` Junio C Hamano
2009-10-05 6:18 ` Johannes Sixt [this message]
2009-10-05 9:00 ` Johannes Schindelin
2009-10-05 9:09 ` Johannes Sixt
2009-10-05 9:20 ` Johannes Schindelin
[not found] ` <alpine.DEB.1.00.0910051027010.4985@pacific.mpi-cbg.de>
2009-10-05 9:21 ` Johannes Schindelin
2009-10-05 11:22 ` Jens Lehmann
2009-10-05 17:32 ` Jens Lehmann
2009-10-05 20:39 ` Johannes Schindelin
2009-10-05 19:08 ` Junio C Hamano
2009-10-05 21:08 ` Johannes Schindelin
2009-10-06 10:58 ` Jens Lehmann
2009-10-06 11:36 ` Junio C Hamano
2009-10-06 11:45 ` Johannes Schindelin
2009-10-06 11:51 ` Jens Lehmann
2009-10-06 12:10 ` Johannes Schindelin
2009-10-07 19:32 ` Jens Lehmann
2009-10-07 20:00 ` Junio C Hamano
2009-10-07 22:28 ` Johannes Schindelin
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=4AC98FC8.3090202@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.