git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/8] Better heuristics make prettier diffs
@ 2016-09-05  9:44 Michael Haggerty
  2016-09-05  9:44 ` [PATCH v3 1/8] xdl_change_compact(): fix compaction heuristic to adjust ixo Michael Haggerty
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Michael Haggerty @ 2016-09-05  9:44 UTC (permalink / raw)
  To: git
  Cc: Ramsay Jones, René Scharfe, Stefan Beller, Junio C Hamano,
	Jeff King, Jakub Narębski, Jacob Keller, Michael Haggerty

This is v3 of the diff-indent-heuristic patch series. Thanks to René,
Junio, and Ramsay for their comments about v2 [1,2].

The heuristic itself hasn't changed since v2. Most of the changes are
in the tests and in how `git blame` is wired up to support the new
options. Changes since v1:

* In "diff: improve positioning of add/delete blocks in diffs":

  * Make `score_cmp()` static.

  * Add test t4059 as part of this commit, not as part of its
    successor.

  * t4059: Create commits to use for the tests (rather than diffing
    loose files with `--no-cache`), so that the same prep can be used
    to test `git blame`. Split the tests into multiple smaller tests.

  * Add a test that `--no-indent-heuristic` overrides the config.

* Add a new commit "parse-options: add parse_opt_unknown_cb()":

  * Allow "-h" help text to be generated for options even if they are
    being handled by code external to `parse_options()`.

  If there's already a way to do this, I didn't find it.

* In "blame: honor the diff heuristic options and config":

  * In v2, I suggested making `blame` honor all diff-related options.
    Junio explained why this was a bad idea. So this version only
    makes `blame` honor `--indent-heuristic` and
    `--compaction-heuristic`.

  * Add some smoke tests.

This patch series is also available from my GitHub fork [3], branch
"diff-indent-heuristic"

[1] http://public-inbox.org/git/cover.1471864378.git.mhagger@alum.mit.edu/
[2] http://public-inbox.org/git/a27aa17e-f602-fc49-92b3-2198e4772e47@ramsayjones.plus.com/
[3] https://github.com/mhagger/git

Michael Haggerty (8):
  xdl_change_compact(): fix compaction heuristic to adjust ixo
  xdl_change_compact(): only use heuristic if group can't be matched
  is_blank_line(): take a single xrecord_t as argument
  recs_match(): take two xrecord_t pointers as arguments
  xdl_change_compact(): introduce the concept of a change group
  diff: improve positioning of add/delete blocks in diffs
  parse-options: add parse_opt_unknown_cb()
  blame: honor the diff heuristic options and config

 Documentation/diff-config.txt            |   7 +-
 Documentation/diff-heuristic-options.txt |   7 +
 Documentation/diff-options.txt           |   7 +-
 Documentation/git-annotate.txt           |   1 +
 Documentation/git-blame.txt              |   2 +
 builtin/blame.c                          |  12 +
 diff.c                                   |  36 +-
 diff.h                                   |   1 +
 git-add--interactive.perl                |   5 +-
 parse-options-cb.c                       |  12 +
 parse-options.h                          |   1 +
 t/t4059-diff-indent.sh                   | 216 +++++++++++
 xdiff/xdiff.h                            |   1 +
 xdiff/xdiffi.c                           | 635 ++++++++++++++++++++++++++-----
 14 files changed, 828 insertions(+), 115 deletions(-)
 create mode 100644 Documentation/diff-heuristic-options.txt
 create mode 100755 t/t4059-diff-indent.sh

-- 
2.9.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-09-20  6:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-05  9:44 [PATCH v3 0/8] Better heuristics make prettier diffs Michael Haggerty
2016-09-05  9:44 ` [PATCH v3 1/8] xdl_change_compact(): fix compaction heuristic to adjust ixo Michael Haggerty
2016-09-05  9:44 ` [PATCH v3 2/8] xdl_change_compact(): only use heuristic if group can't be matched Michael Haggerty
2016-09-05  9:44 ` [PATCH v3 3/8] is_blank_line(): take a single xrecord_t as argument Michael Haggerty
2016-09-05  9:44 ` [PATCH v3 4/8] recs_match(): take two xrecord_t pointers as arguments Michael Haggerty
2016-09-05  9:44 ` [PATCH v3 5/8] xdl_change_compact(): introduce the concept of a change group Michael Haggerty
2016-09-05  9:44 ` [PATCH v3 6/8] diff: improve positioning of add/delete blocks in diffs Michael Haggerty
2016-09-05  9:44 ` [PATCH v3 7/8] parse-options: add parse_opt_unknown_cb() Michael Haggerty
2016-09-05  9:44 ` [PATCH v3 8/8] blame: honor the diff heuristic options and config Michael Haggerty
2016-09-07 18:11 ` [PATCH v3 0/8] Better heuristics make prettier diffs Junio C Hamano
2016-09-07 21:21   ` Jacob Keller
2016-09-07 23:25 ` Junio C Hamano
2016-09-19  6:35   ` Michael Haggerty
2016-09-19 16:05     ` Junio C Hamano
2016-09-19 17:27       ` Junio C Hamano
2016-09-20  6:33         ` Michael Haggerty

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).