From: Junio C Hamano <gitster@pobox.com>
To: Antoine Pelisse <apelisse@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: [RFD] Combine diff improvements
Date: Thu, 14 Mar 2013 22:54:22 -0700 [thread overview]
Message-ID: <7vboalw6lt.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CALWbr2zY3uo==QTd69t1eXNS4-CX1w3T-AaMjOLVmxj-SMJyvg@mail.gmail.com> (Antoine Pelisse's message of "Thu, 14 Mar 2013 23:32:35 +0100")
Antoine Pelisse <apelisse@gmail.com> writes:
> While if we invert the two parents order we will have:
> - 3
> --1
> --2
> - 4
> -3
> -4
>
> While clearly, in both cases, the optimal solution would be close to:
> - 3
> --1
> --2
> -3
> --4
We should shoot for better readability as the primary goal. When I
am viewing "--cc" output, I find it easier to read if the lines for
the same parent are consecutive. That is, I find the right one far
easier to grok than the left one:
- 1 - 1
-2 - 3
- 3 -2
-4 -4
when trying to see what got changed from the first parent (we had 1
and then 3 and whatever comes after this block; 2 and 4 are noise
and it makes it easier to skip them because they are together).
This can probably be done as a post-process phase after you find the
coalescing matches to express the result in the smallest number of
lines, but I thought it is worth mentioning that not all solutions
with the same number of lines are equally good.
next prev parent reply other threads:[~2013-03-15 5:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 22:32 [RFD] Combine diff improvements Antoine Pelisse
2013-03-14 22:52 ` Junio C Hamano
2013-03-15 5:54 ` Junio C Hamano [this message]
2013-03-17 13:03 ` [PATCH] combine-diff: coalesce lost lines optimally Antoine Pelisse
2013-03-17 13:58 ` Antoine Pelisse
2013-03-17 20:10 ` Junio C Hamano
2013-03-17 20:37 ` Antoine Pelisse
2013-03-17 22:37 ` Junio C Hamano
2013-03-23 17:23 ` [PATCH v2] " Antoine Pelisse
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=7vboalw6lt.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=apelisse@gmail.com \
--cc=git@vger.kernel.org \
/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).