Commits
- Commit:
98670ba726486c39efff220ab1e074c62023aae7
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: rework SHA detection
Simply the SHA detection by not predicating on libcrypto, but instead
checking individual header files.
- Commit:
4680f704353811c8bb6ce65eac3714d1bd200c26
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: remove sha1.h; found portably
Remove sha1.h as this is found portably across systems.
- Commit:
588a8092bc282294ee23585991e81586905a8fd4
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
35cdfa2c870e6a3e81defeece73b69570753a845
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
use struct got_object_id instead of sha1 digest in a few imsg
change got_img_commit_painting_request, got_imsg_tag_object and the data
of GOT_IMSG_TRAVERSED_COMMITS not to copy the sha1 digest to the imsg
buffer and then from it to a new struct got_object_id but send directly
the whole struct.
ok stsp@
- Commit:
c5b519a9a281ccd2b4787f4409e7431fc66f92bc
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
copy whole object id not only the sha1; missed in previous commits
- Commit:
83592549c4d0fd93b998c76efe6d1cb9286d4e8b
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
style
- Commit:
d77295e3494661d565f3c3e60d10df899d4d681c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got_imsg_raw_delta_request: use struct instead of buffer for id
ok stsp@
- Commit:
b6f6773045fc2a75fd5de6bf0d880c03c4f27aaa
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got_imsg_packed_object: use struct instead of buffer for id
ok stsp@
- Commit:
47f028303ca0cb504743f84d2658e815f23ae53b
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
avoid traversing enumerated commits more than once in got-read-pack
Keep track of parent commits that will be processed as part
of looping over the commit queue provided by the main process,
and do not add these commits to the queue again.
Fixes pointless traversal of commits on the queue which will
simply be skipped. The end result is the same either way.
ok tracey
- Commit:
4088ab23bf2d330dc66483a747e0efb6c185eed8
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix missing commits in pack files created with packed object enumeration
got-read-pack forgot to send a tree-enumeration-done message to the
main process if the tree of a given commit had already been traversed.
The main process would then not add the corresponding commit to the
pack file, even though it should be added.
Found while using 'got send' towards gotd in order to populate an
empty repository on the server with non-trivial history, where some
commits always ended up missing due to this bug.
ok tracey
- Commit:
c44c7d6e16104afbe967e70415d98e2e58ec1b23
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
avoid copying reused deltas to delta cache file; copy from pack file instead
ok op@
- Commit:
aa75acde9c5f406b658c54827bc596cf96d7c64e
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
check size before calling mmap(2)
It's only a preparatory step, as checking whether a size_t is less than
SIZE_MAX is moot. In a follow-up commit, however, the `filesize' field
of the struct got_pack will become off_t and these checks will kick in.
This also makes consistent how we guard mmap(2) against empty files.
ok and improvements stsp@
- Commit:
c77e00b3da8bc9349b4512c0b9905c7c9f3f52ef
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
allow got_object_parse_tree to reuse entries buffer allocations for speed
ok millert@
- Commit:
b6b86fd1b9828e38d59915e62fddce62952b8b75
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
remove trailing whitespace; patch by Josiah Frentsos
- Commit:
60b94e7d2a2d0fd6dc815d562ee11ba673819a7c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
mark got_error_fmt as printf-like and fix the arisen errors
ok stsp@
- 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:
ec2b23c5d2570888a1d83ce2e8eee5a90eeff695
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
implement support for commit coloring in got-read-pack for speed
ok op, tracey
- 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:
0f4feb58a3a8349d878d406fbd88a9774df62ddb
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
wrap an overlong line in enumeration_request()
- Commit:
ef53e23c28efc2b91e6a2fbbb3a1e914a895745d
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix a bug in got_privsep_send_object_idlist() exposed by recent changes
The old code did not work correctly if only a single object Id was to
be sent to got-read-pack. Make got-read-pack error out if the list
of commits for object enumeration is empty to catch this problem if
it occurs again.
Found by the send_basic test, which was failing with GOT_TEST_PACK=1
ok tracey
- Commit:
e71f1e62ddab990a047fe827d13b25003a9b8014
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
let got-read-pack be explicit about whether it could enumerate all objects
This allows the main process to avoid looping over all object IDs again
in case the pack file used for enumeration is complete.
ok op@
- Commit:
93088ccae4944671d38d0792e22c381cde9cc82f
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix wrong arguments to calloc(3) in enumeration_request()
- Commit:
63915ee56b87d0499239ed129420c15d499e356f
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
Bring back object enumeration inside got-read-pack as a fast path.
The problem that was found in the earlier version has been fixed.
ok op@
- Commit:
3dfecf3ec1705f859b837950a7ec01c15200e428
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
revert object enumeration in got-read-pack for now; needs more work
This implementation marked commits and trees as enumerated before all trees
which they depend on were enumerated. This behaviour leads to incomplete
pack files when a tree is only partially packed and got-read-pack hits
a missing tree entry as a result. The algorithm must be reworked such
that packed leave nodes are marked enumerated first, then bubble-up.
Found by op@
- Commit:
0c0d91c226092a6a2308a984372b445983ae8f0e
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
in enumeration_request(), use the correct index for tagged commit objects
Fixes an error where got-read-pack errors out with "bad object data"
during 'got send' because we ended up handing a tag object to the
commit object parser.