Commit Briefs

0dd7613ce6 Mark Jamsek

special case 'got fetch -b <branch>' to only fetch <branch>

As discussed on irc, this drops the implicit remote HEAD fetch when -b is used. got.1 has been updated to make the new fetch behaviour clear. ok stsp@


ec218e165d Mark Jamsek

got: use intermediate pointers to plug leak on realloc

And save worktree_branch_len for reuse. ok stsp@ and op@


188f8dcf2c Stefan Sperling

fix interaction of 'got fetch -b', got.conf, and work tree

Without branches in got.conf for a remote, and without -b/-R options, the fallback to HEAD would only work when not invoked in a work tree. With this fix 'got fetch' should behave as described in the man page. The -b option now overrides both got.conf and the fallback to the work tree's branch. And fallback to HEAD works as expected when invoked in a repository. Also, do not strictly require remote repositories to provide a branch from the refs/heads/ namespace. In such cases users should be able to use -R to select something to fetch. ok jamsek


0701e66c20 Omar Polo

got_imsg_fetch_ref: use struct instead of buffer for id

ok stsp@


4b4da3bbc7 Omar Polo

got_imsg_fetch_have_ref: use struct instead of buffer for id

ok stsp@


00b3e9ae14 Omar Polo

replace malloc+memcpy with strndup. no functional change intended

ok stsp@


d8bacb9337 Mark Jamsek

got: minor refactor of got_pathlist_free() API

Accept flag parameter to optionally specify which pointers to free. This saves callers looping through the list to free pointers. ok + fix stsp@


9114dd4302 Mark Jamsek

fix uninitialised fildes variables in libexec helpers

Reviewed and uncovered as part of the diff in the forthcoming commit (pathlist API refactor). ok stsp@


99fd9ff4bf Omar Polo

always cast ctype' is*() arguments to unsigned char

ok stsp@


c9f1ac4671 Stefan Sperling

make 'got clone -b' work for repositories which lack a HEAD reference

ok op@



dd4ea8bd9b Stefan Sperling

got-fetch-pack: fix wrong memmove length leading to dubious checksum failures

ok millert tracey


5e91dae4dd Stefan Sperling

remove trailing whitespace; patch by Josiah Frentsos


438d0cc30b Omar Polo

fix snprintf error handling

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


ea8d9c76cc Omar Polo

convert two snprintf to strlcpy

"looks good to me" millert@