Commits
- Commit:
2d28509da5e9083d173044b04757f67a0fa66c28
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
when finding changed paths iterate tree entries in on-disk order for speed
ok op, jamsek
- Commit:
232c0ac1b26d38add9148b4e0382fc86c0cabd37
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
remove dependency of gitwrapper, gotctl, and gotsh on object_parse.c
Move some functions from object_parse.c into hash.c. These functions either
require hash.c code anyway or contain object ID implementation internals.
Add a new file object_qid.c, for got_object_id_queue and got_object_qid.
This new file must be linked to virtually every program.
- Commit:
4fccd2fe0ffbbc668b66abe63614470635f92f1b
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: configure: split out dependencies
Rather than assume all dependencies are required for all programs, split
them out.
This will make packaging easier, as well as splitting the code to use
subprojects.
Note that due to the use of config.h semantics, in most cases the
got_compat.h header file is now at the top of the .c file it is included
in, so that it can handle the system header inclusion properly.
- Commit:
a578d6ec6d3818f6a19379ef10e6def9dc71abb1
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix GOT_IMSG_COMMIT_TRAVERSAL_REQUEST
The sending and receiving side are sending the data differently. It
works now by chance since a struct got_object_id is "just" a
SHA1_DIGEST_LENGTH sized buffer, but will break in the future.
Furthermore, the structure of the data as described in got_lib_privsep.h
is not respected, as the path_len field is not transmitted.
Change it to send/receive a whole struct got_object_id, the path without
the NUL and the proper length. (The path is also actually mandatory, so
assert it too.)
improvements + ok stsp@
- 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@