From: Stefan Beller <sbeller@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Stefan Beller <stefanbeller@gmail.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH 06/10] diff.c: emit_line_0 can handle no color
Date: Mon, 12 Sep 2016 17:25:37 -0700 [thread overview]
Message-ID: <CAGZ79kbP3k0pa62xpv3SCnTvp-qSzfGKjSy8infcx=EexnBOTA@mail.gmail.com> (raw)
In-Reply-To: <xmqqoa3swteo.fsf@gitster.mtv.corp.google.com>
On Mon, Sep 12, 2016 at 5:11 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Stefan Beller <stefanbeller@gmail.com> writes:
>
>> From: Stefan Beller <sbeller@google.com>
>>
>> ---
>
> "X can do Y" can be taken as a statement of fact (to which "so
> what?" is an appropriate response), a desire (to which "then please
> say 'make X do Y' instead" is an appropriate response), or a report
> of a bug (to which "please explain why X should be forbidden from
> doing Y" is an appropriate response).
>
> This is way under-explained. I think this is "make X do Y" kind,
> and if so, please say so and possibly why it is a good idea to teach
> X how to do Y.
>
> Thanks.
Ok, I see the general pattern of your answers: Add more explanations.
Answering for
patch 01/10 as well as this one here:
I want to propose an option to detect&color moved lines in a patch,
which cannot be done in a one-pass over the diff. Instead we need to go
over the whole diff twice, because we cannot detect the first line of a
line pair that got moved in the first pass. So I aim for
* collecting all output into a buffer as a first pass,
* as the second pass output the buffer.
So in a later patch I will split up the emit_line_* machinery to either
emitting to options->file or buffering if we do the 2 pass thing.
To make sure the 2 passes work correctly, we need to make sure all output
is routed through the emit_line functions, and there will be no direct writes.
Now that we will be using the emit_lines functions for non colored
output as well,
we want to pass in "no color" which I think is best done via NULL and then not
calling the output of the color writes.
next prev parent reply other threads:[~2016-09-13 0:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-11 5:42 [PATCH 00/10] Another preparatory series for rename detection Stefan Beller
2016-09-11 5:42 ` [PATCH 01/10] diff: move line ending check into emit_hunk_header Stefan Beller
2016-09-12 23:35 ` Junio C Hamano
2016-09-11 5:42 ` [PATCH 02/10] diff: emit_{add, del, context}_line to increase {pre,post}image line count Stefan Beller
2016-09-12 23:47 ` Junio C Hamano
2016-09-11 5:42 ` [PATCH 03/10] diff.c: drop tautologous condition in emit_line_0 Stefan Beller
2016-09-12 23:53 ` Junio C Hamano
2016-09-16 23:04 ` Stefan Beller
2016-09-11 5:42 ` [PATCH 04/10] diff.c: rename diff_flush_patch to diff_flush_patch_filepair Stefan Beller
2016-09-12 23:53 ` Junio C Hamano
2016-09-11 5:42 ` [PATCH 05/10] diff.c: reintroduce diff_flush_patch for all files Stefan Beller
2016-09-13 0:05 ` Junio C Hamano
2016-09-11 5:42 ` [PATCH 06/10] diff.c: emit_line_0 can handle no color Stefan Beller
2016-09-13 0:11 ` Junio C Hamano
2016-09-13 0:25 ` Stefan Beller [this message]
2016-09-11 5:42 ` [PATCH 07/10] diff.c: convert fn_out_consume to use emit_line_* Stefan Beller
2016-09-13 0:25 ` Junio C Hamano
2016-09-13 0:41 ` Stefan Beller
2016-09-11 5:42 ` [PATCH 08/10] diff.c: convert emit_rewrite_diff " Stefan Beller
2016-09-11 5:42 ` [PATCH 09/10] diff.c: convert emit_rewrite_lines to use emit_line_0 Stefan Beller
2016-09-11 5:42 ` [PATCH 10/10] submodule.c: convert show_submodule_summary to use emit_line_fmt Stefan Beller
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='CAGZ79kbP3k0pa62xpv3SCnTvp-qSzfGKjSy8infcx=EexnBOTA@mail.gmail.com' \
--to=sbeller@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=stefanbeller@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).