From: Jeff King <peff@peff.net>
To: Stefan Beller <sbeller@google.com>
Cc: Davide Libenzi <davidel@xmailserver.org>,
Jacob Keller <jacob.keller@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
Git mailing list <git@vger.kernel.org>,
Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: weird diff output?
Date: Thu, 14 Apr 2016 22:18:29 -0400 [thread overview]
Message-ID: <20160415021829.GD22112@sigill.intra.peff.net> (raw)
In-Reply-To: <CAGZ79ka8pgPNZKaVWnsa_S07esxkN9nJfhcMZvCfd5U6MtsrYQ@mail.gmail.com>
On Thu, Apr 14, 2016 at 02:05:03PM -0700, Stefan Beller wrote:
> > Looking over the code, I agree that xdl_change_compact() is the place we
> > would want to put it. We'd probably tie it to a command-line option and
> > let people play around with it, and then consider making it the default
> > if there's widespread approval.
>
> I just stumbled upon
> http://blog.scoutapp.com/articles/2016/04/12/3-git-productivity-hacks
> which advertises git config --global pager.diff "diff-so-fancy | less
> --tabs=4 -RFX"
>
> Would you consider your perl script good enough to put that instead of
> diff-so-fancy?
For some definition of "good enough". I don't plan to run it myself. And
I don't use diff-so-fancy. But I think diff-so-fancy folks also tend to
run contrib/diff-highlight, which is written in perl and quite similar
in structure to what I posted earlier (unsurprisingly, since I wrote
it).
So I think it works, and the performance hit from piping through perl
generally isn't bad enough to be a problem (and by definition it's only
running when you would run an interactive pager in the first place).
I don't think that this particular heuristic is in quite the same class
as diff-highlight and diff-so-fancy, though. Those ones transform the
diff away from something that can be applied, so you really do just want
them for human viewing. But this new heuristic is something that you'd
probably want as part of format-patch, for example, and we don't
generally kick in the pager there. So I think it would be much more
natural inside of the diff generation.
-Peff
prev parent reply other threads:[~2016-04-15 2:18 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 0:26 weird diff output? Jacob Keller
2016-03-29 17:37 ` Stefan Beller
2016-03-29 17:54 ` Junio C Hamano
2016-03-29 18:16 ` Stefan Beller
2016-03-29 23:05 ` Jacob Keller
2016-03-30 0:04 ` Junio C Hamano
2016-03-30 4:55 ` Jeff King
2016-03-30 6:05 ` Stefan Beller
2016-03-30 6:05 ` Jacob Keller
2016-03-30 19:14 ` Jacob Keller
2016-03-30 19:31 ` Jacob Keller
2016-03-30 19:40 ` Stefan Beller
2016-04-01 19:04 ` Junio C Hamano
2016-03-31 13:47 ` Jeff King
2016-04-06 17:47 ` Jacob Keller
2016-04-12 19:34 ` Stefan Beller
2016-04-14 13:56 ` Davide Libenzi
2016-04-14 18:34 ` Jeff King
2016-04-14 21:05 ` Stefan Beller
2016-04-15 0:07 ` [RFC PATCH, WAS: "weird diff output?"] Implement better chunk heuristics Stefan Beller
2016-04-15 0:26 ` Jacob Keller
2016-04-15 0:43 ` Stefan Beller
2016-04-15 2:07 ` Jacob Keller
2016-04-15 2:09 ` Junio C Hamano
2016-04-15 3:33 ` Stefan Beller
2016-04-15 0:21 ` weird diff output? Jacob Keller
2016-04-15 2: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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160415021829.GD22112@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Jens.Lehmann@web.de \
--cc=davidel@xmailserver.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jacob.keller@gmail.com \
--cc=sbeller@google.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).