Tree
- Tree:
7c8431b2abdd268b982e62edc678f50aaaf76937
- Date:
- Message:
- back out "improve accuracy of function prototype in hunk headers" which was commit 8993f42562696079866fc2dec7191877b6cc1f18 This commit introduced a regression where hunk headers would contain lines taken from below or within a change. Reported by tb@ and sthen@. There is some confusion around how the -p feature was documented: -p With unified and context diffs, show with each change the first 40 characters of the last line before the context beginning with a letter, an underscore or a dollar sign. For C source code following standard layout conventions, this will show the prototype of the function the change applies to. The original behaviour matches "the last line before the context beginning with a letter ...". The new (reverted) behaviour sometimes matches "will show the prototype of the function the change applies to". This did always happen as intended, as seen when some .c files in the OpenBSD src tree were changed. The new behaviour was also worse for Makefiles in the OpenBSD ports tree. Let's revert to the traditional -p behaviour until a better fix is found. Details: https://marc.gameoftrees.org/mail/1692696001.69872_0.html https://marc.info/?l=gameoftrees&m=169269624516330&w=2 ok tb@
.gitignore | commits | blame |
LICENCE | commits | blame |
README | commits | blame |
compat/ | |
diff/ | |
diff-version.mk | commits | blame |
include/ | |
lib/ | |
man/ | |
test/ |
README
This is a collection of diff algorithms, to test various combinations. The initial aim was to provide a faster diff implementation for got (gameoftrees.org) with a BSD license, at the u2k20 OpenBSD hackathon. A side effect could be improving OpenBSD's /usr/bin/diff utility. At the time of writing, this is little more than a playground / benchmark basis / diff algorithm analysis platform. What could be done: - add profiling and test series to rate diff algorithm combinations. - interface with / merge into got. The Myers and Patience Diff algorithm implementations found here are based on the explanations found in these blog post series: https://blog.jcoglan.com/2017/02/12/the-myers-diff-algorithm-part-1/ ff. and https://blog.jcoglan.com/2017/09/19/the-patience-diff-algorithm/ ff. -- possibly the single most comprehensive explanations of these algorithms. Many thanks for this valuable door opener! The source code itself is not based on the code found in those blogs, but written from scratch with the knowledge gained. Compile: make -C diff Test: make -C test/