Commit Briefs

Thomas Adam

got patch: use ints for line offsets instead of longs

ints have the advantage that their size is more likely to be the same across the various architecture supported by OpenBSD, thus introducing less possible differences. INT_MAX is still (at least) a few order of magnitudes higher than the patches we dealt with (even abnormal ones.) suggested by stsp@






Thomas Adam

trailing whitespaces


Thomas Adam

got patch: handle git-style rename diffs

extend the support for git-style diffs to include the "pure rename" case, i.e. when a file is renamed without any edits. ok stsp@


Thomas Adam

got-read-patch: preserve all \ lines

as a cheap optimization got-read-patch was sending only the "\ No newline at end of file" lines that follows an addition (a "+" line). To be able to reverse patches in the future got_patch needs to know about all of these lines instead. No functional changes intended. ok stsp@


Thomas Adam

got patch: allow to strip path components

Move some bits from the libexec helper to the main process so we know if the patch was generated by git or not and finally document the automatic stripping of a/ and b/ prefixes added by git-diff(1). ok stsp@




Thomas Adam

got patch: prefer new name if not /dev/null and not a git-style diff

This fixes a common issue when for e.g. generating patches with $ diff -u foo.orig foo where 'got patch' failed because 'foo.orig' has an 'unexpected status'. prodded by naddy, ok stsp


Thomas Adam

style


Thomas Adam

got-read-patch: plug memory leak


Thomas Adam

portable: got-read-patch: use compat includes

Remove the global header #includes for those items which are detected portably.


Thomas Adam

portable: add landlock to got-patch

Add the appropriate call to tje got-patch machinary to enable landlock();


Thomas Adam

portable: enable got-read-patch

Allow the libexec helper, `got-read-patch` to be compiled, portably.