Commit Briefs

Stefan Sperling

remove GOT_ERR_ITER_BUSY from got_commit_graph_iter_start()

Just clear any left-over iteration state and begin a fresh iteration instead of returning GOT_ERR_ITER_BUSY if the caller did not loop through the entire graph. This change currently doesn't matter much since all existing callers only do a single pass over the graph. But it frees up an error code and makes this API more flexible.



Stefan Sperling

use a separate .cvg meta data directory for cvg(1) work trees

This prevents mixing the use of got and cvg clients in the same work tree. Avoids confusion going forward while cvg differentiates itself further. tog(1) and gotadmin(1) remain compatible with both work tree formats. These tools only read work trees to locate the corresponding repository.


Mark Jamsek

implement support for keywords as got <commit> arguments

This begins enabling the use of keywords in got wherever commit ids or references are used, with more work intended to expand support across all such instances (e.g., branch, checkout, etc.), and add more keywords. The keywords ":base" and ":head" can be passed to 'got {diff,log,update} -c' commands as a substitute for the corresponding commit hash id. Keywords and references can also be modified by appending a ':+' or ':-' and an optional integer N to specify by first parent traversal the Nth generation descendant or antecedent, respectively. If N is omitted, a '1' is implicitly appended. tweaks + ok op and stsp


Omar Polo

add an initial implementation of gotadmin load

it is intended to be the counterpart of `gotadmin dump' and, just like it, there's planned support for handling fast-import stream. At the moment it only deals with git bundles. ok stsp


Stefan Sperling

reword user-facing error message which mentions "fast-forward"

For user-facing messages it is better to avoid technical jargon like this and instead spell out what the fast-forward situation implies: that one branch is already based on another. ok jamsek


Omar Polo

retire GOT_ERR_QUERYSTRING

it's redundant with GOT_ERR_BAD_QUERYSTRING; convert its only use to the latter.


Stefan Sperling

make 'got merge -c' fail even if new changes only affect unrelated paths

Otherwise, 'got merge -c' can silently revert already committed changes. Also fix GOT_ERR_MERGE_COMMIT_OUT_OF_DATE by giving it a value distinct from GOT_ERR_MERGE_STAGED_PATHS. Patch by James Cook


Stefan Sperling

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.


Stefan Sperling

add support for protecting references against 'got send -f' to gotd

ok op@


Stefan Sperling

require gotsh to exist if the repository is listed in gotd.conf

ok op@


Omar Polo

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>


Mark Jamsek

got: drop commit -A $GOT_AUTHOR restriction

As discussed with op and stsp on irc, this prevents the valid case of changing a commit's author to yourself during a histedit operation, and potentially blocks other valid use cases too. ok stsp@ and op@


Omar Polo

introduce got_error_checksum

ok stsp@


Omar Polo

introduce got_object_id_hex to replace some got_sha1_digest_to_str()

It's an analogous to got_object_id_str but writes to the given buffer. ok + improvements by stsp@