Commit Briefs


Thomas Adam

move declaration of got_privsep_child out of got_lib_privsep.h

This declaration is the only reason why got_lib_privsep.h must be included in order to use got_lib_repository.h. Moving this declaration will allow for cleaning up unnecessary includes of got_lib_privsep.h.


Thomas Adam

ensure got patch respects x-bit perms for new files

Reported by stsp on IRC: got patch failed to set the x-bit for a new file despite got diff recording mode 755. Parse got and git diffs for this data and set file modes accordingly. Tweaked with hint from op. ok stsp@



Thomas Adam

add signer_id option to got.conf(5)

Setting this option will cause 'got tag' to sign all created tags using the SSH key, unless overridden by the -s flag. ok stsp@


Thomas Adam

create and verify tags signed by SSH keys

This adds a new -s flag to 'got tag' that specifies the signer identity (for example, a key file) of the tagger. The tag object will include a signature that validates each of the tag object headers and the tag message. Verifying these signed tags requires maintaining an allowed signers file which maps signer identities (i.e. the email address of the tagger) to SSH public keys. See ssh-keygen(1) for more details of the allowed signers file. After creating this file and providing the path to it in got.conf(5) using the allowed_signers option, tags may be verified using with 'got tag -V tag_name'. The return code will be non-zero if a signature fails to verify. ok stsp@


Thomas Adam

implement support for commit coloring in got-read-pack for speed

ok op, tracey


Thomas Adam

use the commitid in the patch diff3 conflict header

suggested by and ok stsp@


Thomas Adam

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@


Thomas Adam

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@


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

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@


Thomas Adam

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@


Thomas Adam

implement object enumeration support in got-read-pack

ok op@


Thomas Adam

batch up tree entries in imsg instead of sending one imsg per tree entry

This speeds up loading of trees significantly. ok op@


Thomas Adam

parse tree entries into an array instead of a pathlist

Avoids some extra malloc/free in a performance-critical path. ok op@


Thomas Adam

run the search for deltas to reuse in got-read-pack

This significantly speeds up the deltification step of packing by avoiding imsg traffic. gotadmin no longer requests individual raw deltas from got-read-pack to check whether it can reuse them. Instead, got-read-pack obtains a list of objects we want to pack, and hands back the list of all deltas in its pack file which can be reused. Messages are now batched such that imsg buffers are filled as much as possible. Another advantage is that deltas we are not going to reuse will no longer be written to the delta cache file, saving disk space. Before this patch, any raw delta candidate was written to the delta cache file by got-read-pack, and the decision whether to reuse the delta happened afterwards in the gotadmin process. Code for reading individual raw deltas is now unused and could be removed at some point. ok op@


Thomas Adam

store deltas in compressed form while packing, both in memory and cache file

This reduces memory and disk space consumption during packing. with tweaks + memleak on error fix from op@ ok op@


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

reuse existing deltas when creating pack files

tested by thomas, naddy, and myself


Thomas Adam

portable: initial Linux compilation

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


Christian Weisgerber

indentation fixes


Stefan Sperling

provide separate send {} and fetch {} configuration blocks in got.conf

Feature requested by naddy. ok naddy, who also suggested some tweaks that will arrive shortly


Stefan Sperling

add 'got send' command for sending changes to remote repositories

Known to work against git-daemon and github Git server implementations. Tests by abieber, naddy, jrick, and myself. Man page additions reviewed by Lucas.