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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html