From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Sam Kuper <sam.kuper@uclmail.net>, git@vger.kernel.org
Subject: Re: Bug report: "Use of uninitialized value $_ in print"
Date: Sat, 3 Mar 2018 01:18:02 -0500 [thread overview]
Message-ID: <20180303061802.GJ27689@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqd10mb0v7.fsf@gitster-ct.c.googlers.com>
On Fri, Mar 02, 2018 at 01:53:32PM -0800, Junio C Hamano wrote:
> Sam Kuper <sam.kuper@uclmail.net> writes:
>
> > 1. It would yield, IIUC, less flexibility to create new kinds of view
> > based on a consistent, standardised underlying model.
> >
> > 2. It is harder to read, for some types of input (e.g. prose) than the
> > view generated by the existing word-diff algorithm.
>
> The loss of line-end by the lossy "word-diff" output does not matter
> if you never split hunks, but to be able to split a hunk at an
> in-between context line (which you can already do) and new features
> like per-line selection that are emerging, keeping 1:1 line
> correspondence between what is shown and what is applied is a must.
>
> Unless you are volunteering to design (notice that I am not saying
> "implement") both diff generation/coloration side _and_ patch
> application side, that is. In which case, you may be able to come
> up with a magic ;-)
IIRC, we do the word-diff by first finding the individual hunks with a
normal line diff, and then doing a word diff inside those hunks. So one
easy option would be to add a --color-words option that gets passed
along to the underlying display diff and just disables hunk splitting. I
think we'd also need to start parsing the DISPLAY hunks more carefully
to make sure we re-sync at hunk boundaries.
-Peff
prev parent reply other threads:[~2018-03-03 6:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 1:19 Bug report: "Use of uninitialized value $_ in print" Sam Kuper
2018-03-02 7:04 ` Jonathan Nieder
2018-03-02 10:46 ` Jeff King
2018-03-02 16:53 ` Junio C Hamano
2018-03-02 16:55 ` Jeff King
2018-03-02 17:15 ` Junio C Hamano
2018-03-03 5:57 ` Jeff King
2018-03-03 5:58 ` [PATCH 1/2] t3701: add a test for interactive.diffFilter Jeff King
2018-03-03 5:58 ` [PATCH 2/2] add--interactive: detect bogus diffFilter output Jeff King
2018-03-05 20:53 ` Junio C Hamano
2018-03-05 20:56 ` Jeff King
2018-03-05 21:33 ` Ævar Arnfjörð Bjarmason
2018-03-05 22:09 ` Junio C Hamano
2018-03-05 22:15 ` Ævar Arnfjörð Bjarmason
2018-03-05 21:54 ` Bug report: "Use of uninitialized value $_ in print" Jonathan Nieder
2018-03-02 17:28 ` Sam Kuper
2018-03-02 10:42 ` Jeff King
2018-03-02 17:30 ` Sam Kuper
2018-03-03 6:02 ` Jeff King
2018-03-02 17:48 ` Junio C Hamano
2018-03-02 20:34 ` Sam Kuper
2018-03-02 21:53 ` Junio C Hamano
2018-03-03 6:18 ` Jeff King [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180303061802.GJ27689@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sam.kuper@uclmail.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).