Commits


show file mode for new added files in work tree diffs Make work tree diffs of local changes on disk display the file mode of new added files like other versions of `got diff` currently do. ok stsp@


add gotadmin init -b <branch> to specify repo head ref Similar to `git init -b`. Includes a change to `got import` behaviour such that "main" is no longer hardcoded by default; instead, we import to the branch resolved via the repository's HEAD reference unless `got import -b` is used, and only if HEAD cannot be resolved to a branch do we fallback to "main". includes fix plus ok from stsp@


make got_commit_graph_iter_next use caller-provided storage for the id and adjust the callers. discussed with and ok stsp@


plug leak in the commit graph iterator We fail to release the memory for the nodes. To fix it however, we some consumer of the commit graph iterator need to be corrected: the returned pointer is safe to be used only up until the next iter_next call; save a copy it if it's needed afterwards too. ok stsp@


got: fflush(stdout) after asking questions Not everywhere getline does an implicit fflush, so we might end up not showing the prompt to the user. Spotted on alpine with muslc. ok Thomas Adams


forbid rebase of references outside the refs/heads/ namespace ok jrick


Do not segfault verifying "lightweight" tags ok stsp@


remove trailing whitespace; patch by Josiah Frentsos


got: fix typo in argc check when diffing two blobs We already have two arguments when diffing two blobs, so check for more than two like we do when diffing two objects to check for invalid path args. Includes new regress test by op for diffing two blobs. ok stsp@ and ok plus regress test from op@


fix overflow in blame callback spotted by noticing gotwebd crashing on some blame requests. Diff from stsp@ with a fix from tracey@, I'm committing it only because he is short on time. ok stsp@


fix snprintf error handling follow the "proper secure idiom" described in the CAVEATS section of printf(3). reminded by tb@ and millert@


Group options in accordance with style(9) patch by Josiah Frentsos


fix unused variable, function definition warnings for clang 15


avoid allocating too many errors in cmd_info got_error_path uses get_custom_err to get a statically allocated error allocated on a buffer that's used a ring. This is nice and simple, but the drawback is that thees custom errors shouldn't be used "for too long" because they might get overwritten later. cmd_info is one offender: change it to store a "simple" error and later re-use it to construct the per-path error. OK and tweaks stsp@


fix "got tag" not tagging the work tree's current branch by default found by jrick