Commit Briefs

a42e5f4ff9 Thomas Adam

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


8b925c6ccd Thomas Adam

portable: add back sys/queue.h

Now that the handling of including sys/queue.h is better, there's no need to remove those lines from the source. Copy the location of those original sys/queue.h lines from upstream at the same line number, so as to avoid any conflicts in the future.


25ec70067d Thomas Adam

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


89fe1c42b3 Thomas Adam

portable: fix-up sha1.h include

-portable doesn't need this directly.


9a267125aa Thomas Adam

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@


82f9484cc5 Thomas Adam

portable: include sha1.h portably

Don't directly include sha1.h as this isn't always in the same location across systems.


c17f3d0c7b Thomas Adam

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@


b0e25f642d Thomas Adam

portable: freebsd: portably include sha1

The SHA implementation is found portably across systems, so don't include sha1.h directly.


ec242592d3 Thomas Adam

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@


48b4f23903 Thomas Adam

wrap overlong lines


c56c5d8a20 Thomas Adam

add "e" (close-on-exec) flag to fopen(3) calls

suggested by millert ok thomas_adam


24f136e0f9 Thomas Adam

preverse binary files during updates and merges




3c7939fe2b Thomas Adam

fix another segfault in edscript()

Same problem as fixed in 90de04bc7f1b85b9c491bcd124f6178fad005de1. ok stsp


b6c8e5e0ed Thomas Adam

fix a segfault in edscript() introduced by my previous commit

Found by our cherrypick regression tests.


461f6aedbd Thomas Adam

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


dd038bc6ec Thomas Adam

portable: initial Linux compilation

This commit modifies the GoT main branch to be able to compile it under linux.


abc59930d5 Christian Weisgerber

indentation fixes


fdf3c2d387 Stefan Sperling

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.



1fee9f40e2 Stefan Sperling

fix 3-way merge of files which lack a final \n

problem found by jrick ok millert


bc62ede807 Stefan Sperling

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.


56b63ca4ab Stefan Sperling

make fclose(3) failure checks consistent; check 'fclose() == EOF' everywhere

ok millert, naddy