From: Stefan Beller <sbeller@google.com>
To: jacob.keller@gmail.com
Cc: git@vger.kernel.org, gitster@pobox.com, peff@peff.net,
Jens.Lehmann@web.de, davidel@xmailserver.org,
Stefan Beller <sbeller@google.com>
Subject: [RFC PATCH, WAS: "weird diff output?" v3a 0/2] implement shortest line diff chunk heuristic
Date: Fri, 15 Apr 2016 16:01:44 -0700 [thread overview]
Message-ID: <1460761306-18794-1-git-send-email-sbeller@google.com> (raw)
This is a version based on Jacobs v2, with the same fixes as in his v3 (hopefully),
changing the heuristic, such that CRLF confusion might be gone.
TODO:
* add some tests
* think about whether we need a git attribute or not (I did some
thinking, and if we do need to configure this at all, this is where I
would put it)
Later on we want to have git attributes I'd think. For now let's just keep
the `git config diff.shortestlineheuristic true` config option for testing?
Changes since Jacobs v2:
* s/empty line/shortest line/g
That new heuristic is a superset of the empty line heuristic as empty lines
are shortest lines. This solves the "What is an empty line?" question
(Think of CRLF vs LF)
* fixed Jacobs rebase mistake (which is also fixed in Jacobs v3)
Changes since my v1:
* rename xdl_hash_and_recmatch to recs_match
* remove counting empty lines in the first section of the looping
Changes since Stefan's v1:
* Added a patch to implement xdl_hash_and_recmatch as Junio suggested.
* Fixed a segfault in Stefan's patch
* Added XDL flag to configure the behavior
* Used an int and counted empty lines via += instead of |=
* Renamed starts_with_emptyline to is_emptyline
* Added diff command line and config options
Jacob Keller (1):
xdiff: add recs_match helper function
Stefan Beller (1):
xdiff: implement empty line chunk heuristic
Documentation/diff-config.txt | 6 ++++++
Documentation/diff-options.txt | 6 ++++++
diff.c | 11 +++++++++++
xdiff/xdiff.h | 2 ++
xdiff/xdiffi.c | 43 ++++++++++++++++++++++++++++++++++++++----
5 files changed, 64 insertions(+), 4 deletions(-)
--
2.8.1.189.gd13d43c
next reply other threads:[~2016-04-15 23:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-15 23:01 Stefan Beller [this message]
2016-04-15 23:01 ` [PATCH 1/2] xdiff: add recs_match helper function Stefan Beller
2016-04-15 23:01 ` [PATCH 2/2] xdiff: implement empty line chunk heuristic Stefan Beller
2016-04-15 23:05 ` Jacob Keller
2016-04-15 23:32 ` Jacob Keller
2016-04-15 23:45 ` Stefan Beller
2016-04-16 0:49 ` Junio C Hamano
2016-04-16 0:59 ` Stefan Beller
2016-04-16 1:07 ` Jacob Keller
2016-04-18 19:22 ` Junio C Hamano
2016-04-18 19:33 ` Stefan Beller
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=1460761306-18794-1-git-send-email-sbeller@google.com \
--to=sbeller@google.com \
--cc=Jens.Lehmann@web.de \
--cc=davidel@xmailserver.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jacob.keller@gmail.com \
--cc=peff@peff.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).