Commits
- Commit:
5c5396e5c1ee0b8ede1cce4c7262a946ab1b3970
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add missed `size' initialization for use with getline(3)
ok tb@
- Commit:
5822e79e39a8777984e08b5d89a8c55d6aa0356d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
include sha2.h too where sha1.h is included
In preparation for wide sha256 support; stsp@ agrees. Change done
mechanically with
find . -iname \*.[cy] -exec sam {} +
X ,x/<sha1\.h>/i/\n#include <sha2.h>
- Commit:
b90054ed55f30ebe28115abf5ad9cecc2b925713
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use mkstemps(3) instead of mkstemp(3) for opening named temporary files
Allows 'got commit' to use a ".diff" suffix for temporary diff files.
ok op@
- Commit:
d671c3138b0a55e515557fd21584dd92c4b42a14
- From:
- Tom Jones <thj@freebsd.org>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
switch diff output mode from "edscript" to "plain" for diff3
getchange() in diff3.c takes any line that starts with an integer
and treats it as a hunk header. It doesn't actually require ed script
instructions, and traditional ed script diff output would break it.
Thus, changing Got's diff3 to rely on plain diff output mode paves the
way for implementing traditional ed-script style output in diff.git.
Patch by Tom Jones
- Commit:
4b752015b5208a96c2d1b6c1c6b8589884b8b2b6
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
switch 'tog diff' and 'tog blame' to Myers diff for speed
Make the choice of diff algorithm configurable by diff API users.
The got and gotweb programs keep using Patience diffs which are
prettier than Myers. But tog should be as fast as possible since
it is being used interactively. If performance of Patience diff
gets improved later we can consider switching tog back over to it.
ok tracey jamsek
- Commit:
d7b5a0e827bb38e5c8502f0ba8d7838fedaba19b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
inline struct got_object_id in struct got_object_qid
Saves us from doing a malloc/free call for every item on the list.
ok op@
- Commit:
c0df59665de91324eeab1808c6c4e41343f21789
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
wrap overlong lines
- Commit:
00fe21f262ab567bb792120514b49b37236c5422
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add "e" (close-on-exec) flag to fopen(3) calls
suggested by millert
ok thomas_adam
- Commit:
0e039681388d7ec1f832edcbb108ac28db95ae1e
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
preverse binary files during updates and merges
- Commit:
15a5c949ff1919c186b5ebf2bfcadcaca4939e04
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
set oldo.to in diff3.c's duplicate() even if the file contains no newlines
- Commit:
8383a50b870f78d970e3d7efa1addf07c3d4ef4a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
always initialize output parameter "n" of get_line() in diff3.c
- Commit:
4f18c4000896c6ade7e7bd662d05f75686d338b2
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
fix another segfault in edscript()
Same problem as fixed in 90de04bc7f1b85b9c491bcd124f6178fad005de1.
ok stsp
- Commit:
90de04bc7f1b85b9c491bcd124f6178fad005de1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix a segfault in edscript() introduced by my previous commit
Found by our cherrypick regression tests.
- Commit:
f10244c07ff073c7f69ecf2044ac34e85f0666a0
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix merging of files which contain a dot on a line by itself
Annoying bug which we inherited from OpenRCS which inherited
it from OpenBSD's diff3 program.
ok tracey millert
- Commit:
abc59930d57a2d46c310e1b0c758c948554bc1af
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
indentation fixes
- Commit:
fdf3c2d3876d076bf098461a4d147227126588b4
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use Patience diff for merging during cherrypick/backout/histedit/rebase
This has been shown to prevent mis-merges in some cases. It's probably
not a final solution. We should look at what Git's "recursive merge"
is doing and implement something similar.
Keep using Myers during update/unstage. The advantage of Myers is that
it produces smaller conflict chunks, and there are no known cases of
mis-merges which affect update/unstage.
- Commit:
db59069162efd1ccd4f236abe7d8eb3ca4b791e4
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make merge_file() accept FILEs instead of paths for orig and deriv inputs
- Commit:
1fee9f40e2ed335d4ec8899954b59b43990b97c3
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix 3-way merge of files which lack a final \n
problem found by jrick
ok millert
- Commit:
bc62ede807f0ad3a920fa1e8b05dd90cc8f5f289
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use Myers diff instead of Patience diff when merging files with diff3
Myers diff tends to divide files into smaller diff chunks, while Patience
diff attemps to maximize the size of diff chunks. Smaller diffs chunks
generally result in a more managable presentation of merge conflicts.
- Commit:
56b63ca4ab1049de6fa2d6910ce22c16e2b42a53
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make fclose(3) failure checks consistent; check 'fclose() == EOF' everywhere
ok millert, naddy
- Commit:
16aeacf7088dcd3cd5e654af46a3015cecf41426
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use size_t for loop indices to avoid signedness warnings; from emaste@freebsd
- Commit:
1cb46f007dad47a45d2c2d32aaeee11372f95309
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
consistently label removed files as "/dev/null" in diff headers
- Commit:
64453f7e55c4c69b6cd08229929ed8227b789ff8
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
handle binary files in got/tog diff commands; add -a options to force text
- Commit:
fe621944e83fe6367f7bff97128b4240a9cdc7c5
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
merge new diff implementation from the git.gameoftrees.org diff.git repository
This new diff implementation was started by Neels Hofmeyr during the u2k20
hackathon and now replaces diffreg.c code lifted from the OpenBSD base system.
The integration of this code into Got was done by me.
Got now uses the patience diff algorithm by default.
The diff.git repository will remain the primary repository for the diff code,
which already compiles and runs on other operating systems such as Linux.
Any fixes and improvements for files inherited from the diff.git repository
should be written against that repository and synced to got.git afterwards.
- Commit:
21c17f12d490c7f4b55a696178331c5b490a18d4
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix merging with files that do not contain a newline character; ok millert@