Commit Briefs
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@
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@
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@
use the commitid in the patch diff3 conflict header
suggested by and ok stsp@
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@
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@
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@
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@
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@
batch up tree entries in imsg instead of sending one imsg per tree entry
This speeds up loading of trees significantly. ok op@
parse tree entries into an array instead of a pathlist
Avoids some extra malloc/free in a performance-critical path. ok op@
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@
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@
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@
reuse existing deltas when creating pack files
tested by thomas, naddy, and myself
portable: initial Linux compilation
This commit modifies the GoT main branch to be able to compile it under linux.
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
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.
don't scan pack index offsets for large values if pack file is < 2GB
This saves an iteration over the entire h->offsets array when opening a pack index which should not contain large offsets in the first place. ok millert@