Commit Briefs

012b711c71 Thomas Adam

got_worktree_open: do not skip a locked worktree

When trying to open a worktree from a list of metadata directories (.got, .cvg), error out when a worktree is found but is already locked. Skipping it and proceeding would result in a confusing "no git repository found" error from tog and gotadmin. ok stsp


ad10f64ebe Thomas Adam

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.


4fccd2fe0f Thomas Adam

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.


98670ba726 Thomas Adam

portable: rework SHA detection

Simply the SHA detection by not predicating on libcrypto, but instead checking individual header files.


4680f70435 Thomas Adam

portable: remove sha1.h; found portably

Remove sha1.h as this is found portably across systems.


588a8092bc Thomas Adam

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>



8b925c6ccd Thomas Adam

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.



7cd528337b Thomas Adam

move got_opentempfd out of got_repo_open. ok stsp@

thanks for all the help massaging this diff


89fe1c42b3 Thomas Adam

portable: fix-up sha1.h include

-portable doesn't need this directly.


9a267125aa Thomas Adam

inline struct got_object_id in struct got_object_qid

Saves us from doing a malloc/free call for every item on the list. ok op@


82f9484cc5 Thomas Adam

portable: include sha1.h portably

Don't directly include sha1.h as this isn't always in the same location across systems.


c17f3d0c7b Thomas Adam

inline struct got_object_id in struct got_object_qid

Saves us from doing a malloc/free call for every item on the list. ok op@


b0e25f642d Thomas Adam

portable: freebsd: portably include sha1

The SHA implementation is found portably across systems, so don't include sha1.h directly.


ec242592d3 Thomas Adam

inline struct got_object_id in struct got_object_qid

Saves us from doing a malloc/free call for every item on the list. ok op@


9d70a0bf72 Thomas Adam

portable: make UUID includes generic

Move the detection of UUID header files to be included portably. This will have no functional effect until MacOS detection is put in place.


0634062147 Thomas Adam

add O_CLOEXEC (close-on-exec) flag to open(2) calls

suggested by millert ok thomas_adam


7626433e5d Thomas Adam

portable: remove queue.h

queue.h is included portably, so it shouldn't be included directly.


1ea7ccc6f3 Thomas Adam

let gotadmin find the repository automatically if invoked in a work tree

Move a small amount of code from worktree.c to a new file worktree_open.c, which contains everything required to open and close a work tree and inspect some of its basic parameters. This can be used by gotadmin. ok tracey