Better heuristics make prettier diffs
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest8 patches 7 repliesIn review
- v27 patches 5 repliesSuperseded
- v18 patches 48 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | xdl_change_compact(): fix compaction heuristic to adjust ixoxdiff/ | +1 | 0 replies | |
| 2/8 | xdl_change_compact(): only use heuristic if group can't be matchedxdiff/ | +19 | 0 replies | |
| 3/8 | is_blank_line(): take a single xrecord_t as argumentxdiff/ | +4 | 0 replies | |
| 4/8 | recs_match(): take two xrecord_t pointers as argumentsxdiff/ | +7 | 0 replies | |
| 5/8 | xdl_change_compact(): introduce the concept of a change groupxdiff/ | +203 | 0 replies | |
| 6/8 | diff: improve positioning of add/delete blocks in diffsDocumentation/ Documentation/ diff.c +4 more | +546 | 0 replies | |
| 7/8 | parse-options: add parse_opt_unknown_cb()parse-options-cb.c parse-options.h | +13 | 0 replies | |
| 8/8 | blame: honor the diff heuristic options and configDocumentation/ Documentation/ Documentation/ +5 more | +70 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/8] Better heuristics make prettier diffs
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/[email protected]/
[2] http://public-inbox.org/git/[email protected]/
[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
Signature · 1 line
2.9.3