Commits
- Commit:
8b925c6ccd3968917253ea191906a1710c40ed2d
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
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.
- Commit:
dab315a53201f10e04361d5f740a7e921260d60c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
use got_privsep_flush_imsg instead of reinventing it
ok stsp@
- Commit:
68ceedb3e696e840d09ca33bbc4db85d514f3d67
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
refactor the patch parser
Introduce a patch_start routine that finds the next "diff" header (if
there is one); the idea is to persist some state (commit id and wether
it's a "git diff") while processing the content of the diff. It's
needed because in the case of 'got diff' some information like the
commit id are only present once at the beginning.
As a consequence, the patch parser becomes slightly more robust
(concatenating diffs produced by different means shouldn't confuse it
anymore) and drops the support for "old" got diffs, the ones previous
the introduction of the "commit -/+" header.
ok tracey@
- Commit:
19dd85cbe25c418975d46e00cc13b48e26488715
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: handle git-style diffs for the 3-way merge too
tweak and ok stsp@
- Commit:
8afec5d5388b965430c12e3405765ceb552faefa
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
handle blob ids without corresponding blob ids
ok stsp@
- Commit:
9b4458b41088db703d890881c32dfd242efce4df
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
always show commit or tree IDs in diff header, in order to help 'got patch'
The idea is that got patch can simply look for a line such as:
commit - abcde1234567...
to find the merge base commit ID to show in diff3 conflict markers.
got log -p now displays commit IDs in its diff header, instead ofl
tree or blob IDs.
ok op@
- Commit:
5d120ea8410ddc2808e476d554ba931dc19d8c50
- From:
- Omar Polo <op@omarpolo.com>
- Date:
use capsicum on FreeBSD
Thanks to the design of Got, the libexec helpers don't need any resource
(in fact they run under pledge "stdio recvfd" on OpenBSD) and so using
cap_enter(2) on FreeBSD is dead-easy.
While the main process can't be sandboxed on FreeBSD (needs to exec the
helpers), all the tough work is done by these small libexec helpers
which is also the biggest attack surface.
tested by naddy, ok thomas
- Commit:
016bfe4bc2e2f43aea446f3c89e1539235c66fd2
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
use the commitid in the patch diff3 conflict header
suggested by and ok stsp@
- Commit:
0f76ab831bc589bb34a4953cf60c8a05a4ed708c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: use diff3 to merge the changes
Parse the "blob -" metadata in diffs produced by 'got diff' and use the
original file for patching. Then, use the diff3 with the current
version of the file to merge the differences.
This solves many failures automagically or at least turns them into a
conflict.
ok/improvements stsp@
- Commit:
8ebb3daa7771365ed3667ee1d17a090556495847
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
bafaf650cf9ee98df6390dc7b731fcf9546fb714
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: switch from fseek() to fseeko(), use unary minus while here
ok op
- Commit:
88c260f4a8605679ac53139d0e8f8d7617d68ea9
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: fail when reading empty hunks
- Commit:
3b488fdeec85f8d497d8f35b86efc71f42c26342
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
s/empty/done forgot in previous commit
- Commit:
1992b6cb3ff596207bc3efd3954cdcd13a9ab6b9
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got-read-patch: rename `ok' variable and simplify the parsing a bit
- Commit:
39807ab2985d0e296d207c49fd4ac37ce056fe89
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
trailing whitespaces
- Commit:
8afe1f716136923060b5d7e0838397460b2a4e20
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
656c2baa8669bb412dbff580940fa9ccd8bd1f1f
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
d9db2ff90a20aac31e00f040738fd49a56b38d6b
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
1f9543827e04da5799b5f1a1b320b10eb1860182
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fgetc() returns int, not char; fixes -Werror build on armv7
- Commit:
ff7f34d35c1ceac53ea203c97acadabfed48fca3
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: handle "\ No newline at end of file"
- Commit:
be53ddb1cf400566466802853561b948acaa613e
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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
- Commit:
17d6446ae871d15954803d493cdcc3e9dd968e2c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
style
- Commit:
19f1a2acab41c8b9bb0860811443c055567afb5b
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got-read-patch: plug memory leak
- Commit:
eb3a31e3f279ccfa3de3a8647ecb790e2342109d
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: got-read-patch: use compat includes
Remove the global header #includes for those items which are detected
portably.
- Commit:
762ddcd8e63f22e481054b5046adb0f913f2bada
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: add landlock to got-patch
Add the appropriate call to tje got-patch machinary to enable
landlock();