Commits
- Commit:
ad3b5b58b098ef83ec0c06619a6cb3272a74bcf5
- From:
- Tobias Heider <me@tobhe.de>
- Date:
Rename got-http helper to got-fetch-http to match naming scheme.
We aren't planning to support sending anyway.
ok stsp@
- Commit:
ced242c2ebcf8284b1cb695dc144461cace5313c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Tobias Heider <me@tobhe.de>
- Date:
Add initial read-only http fetch support using a got-http helper.
Currently we only support the smart protocol with a limited feature set.
ok stsp@ tobhe@
- Commit:
494e2b9b6acdb92382e65d0d9c990aaf8d3cbb22
- From:
- Kyle Ackerman <kackerman0102@gmail.com>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
plug a memory leak in 'got blame'
The leak is present in got_privsep_recv_traversed_commits. There is
an edge case where it receives consecutive imsgs. The first behaves as
normal and we got_object_id_dup the last commit id for
changed_commit_id. The following imsg(s) then still allocates the last
commit id, leaking the one(s) prior allocated.
Patch by Kyle Ackerman
- Commit:
4e2fa922ceaa28b6bee21ecd9b09f62be5e1778f
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
hide a pointless end-of-file error on imsg pipe in libexec helpers
This error popped up in op's regress builder:
got-fetch-pack: error 118 "test-repo: Permission denied": poll: unexpected end of file
ok op@
- Commit:
e05fd55cbfee4e4023db6595ae04fa79275c8637
- From:
- Omar Polo <op@omarpolo.com>
- Date:
adjust min_datalen in a few places
Fix the computation of min_datalen that was forgotten in
8f137979fc5e284a136cf8950e8b3895d7ea208b.
got_privsep_recv_imsg() already takes care of converting
GOT_IMSG_ERROR to errors, so just how we didn't need to call
recv_imsg_error() at all, we don't need to include it in the requested
min_datalen.
- Commit:
cc57c2cb8c8d6bc0a47692b47a6fefc5adaf2510
- From:
- Omar Polo <op@omarpolo.com>
- Date:
swap the order of the checks to not hide an error
If a libexec process returns an GOT_IMSG_ERROR that happens to be
smaller than the requested min_datalen, got_privsep_recv_imsg()
returns GOT_IMSG_PRIVSEP_LEN hiding the original error.
ok stsp@
- Commit:
f9e9269513c7ee687c46d6060a784a9ca11646ce
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix invalid imsg_free() in got_privsep_recv_printed_commits()
Depending on the error got_privsep_recv_imsg() may leave imsg
un-initialized, so change it to always free the imsg on error if
needed, so callers don't have to.
got_privsep_recv_printed_commits() and got-read-patch were the only
places where we could end up calling imsg_free() on uninitialized
imsg, fix them.
ok stsp@
- Commit:
f25a765e436b4da9fa7ea68c73e6f65a8f0d968e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix one error being ignored in got_privsep_recv_gitconfig_remotes
- Commit:
2bde3e78a5bd6619af838df19eec530e23783c0b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
don't ignore err in got_privsep_recv_painted_commits
- Commit:
6d0030ba1d9985fc8b8a9a2dc0f0c412c2c678da
- From:
- Kyle Ackerman <kackerman0102@gmail.com>
- Via:
- Omar Polo <op@omarpolo.com>
- Date:
fix memory leak on error in got_privsep_recv_painted_commits()
Diff from Kyle Ackerman, thank you!
I've added a imsg_free() call before the break too.
- Commit:
91f3651eacab82fa74052cacf1b8b5fdf9b05267
- From:
- Omar Polo <op@omarpolo.com>
- Date:
use ibuf_fd_set() instead of reaching into the ibuf struct
discussed with tb@
- Commit:
ac4f092c7c8e090ee733c90b8b0f0274872c8662
- From:
- Omar Polo <op@omarpolo.com>
- Date:
don't redundantly set wbuf->fd to -1
ibuf_dynamic() (called by imsg_create()) already initializes fd to -1.
- Commit:
2161bc24065b9b58f71cbffbb8b65a9546e134f2
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix some fd leaks in error paths and avoid some double close
Sweep done after a few were spotted by tb@, thanks!
ok stsp@
- Commit:
ad4e3a354f1e08e1a53e4864a5f004659d17acc6
- From:
- Omar Polo <op@omarpolo.com>
- Date:
style
- Commit:
2f43cd698e3fcc3000262b3e0f3a2119f06345bb
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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.
- Commit:
47cb6f8b62ed4ad39838a5d4702f593b23d3e7f2
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix GOT_IMSG_COMMIT_TRAVERSAL_REQUEST
The sending and receiving side are sending the data differently. It
works now by chance since a struct got_object_id is "just" a
SHA1_DIGEST_LENGTH sized buffer, but will break in the future.
Furthermore, the structure of the data as described in got_lib_privsep.h
is not respected, as the path_len field is not transmitted.
Change it to send/receive a whole struct got_object_id, the path without
the NUL and the proper length. (The path is also actually mandatory, so
assert it too.)
improvements + ok stsp@
- Commit:
53bf0b541977b66862040d4b633fb6b5d3a3c6c8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rename lib/sha1.c to lib/hash.c
It will soon grow functions to deal with sha256 too. stsp@ agrees.
- Commit:
5822e79e39a8777984e08b5d89a8c55d6aa0356d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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>
- Commit:
076fbedce1fccdd95af706a8b068aa8a49c88165
- From:
- Omar Polo <op@omarpolo.com>
- Date:
use struct got_object_id instead of sha1 digest in a few imsg
change got_img_commit_painting_request, got_imsg_tag_object and the data
of GOT_IMSG_TRAVERSED_COMMITS not to copy the sha1 digest to the imsg
buffer and then from it to a new struct got_object_id but send directly
the whole struct.
ok stsp@
- Commit:
118a625d39930284f891ea1285efc17fb3848cae
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
got: further fetch tweaks to prevent unintended fetches
Implement stsp's suggestion to only fetch remote's HEAD if the symref
refs/remote/*/HEAD exists, and its target no longer matches the remote
HEAD. This ensures users tracking a project won't miss a change in HEAD,
while also fixing the issue reported by naddy where HEAD was fetched by
default even though a specific, potentially less active, branch is cloned,
resulting in a repository with more commits than necessary.
In addition, unless 'got fetch -b <branch>' is used, the remote HEAD branch
will be fetched if branches are not set in got.conf and there is no work
tree to ascertain a branch, or said branches are not found on the server.
ok stsp@
- Commit:
ff08dcd6c83d27f29c7eb78f7b21fee64bebfdd2
- From:
- Omar Polo <op@omarpolo.com>
- Date:
send_tree_entries: simplify len computing
- Commit:
0dd7613ce65424868ec86f0623e38eb70d9a9321
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
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@
- Commit:
ec218e165dfd906f44ad491671127ca4b6979ed0
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
got: use intermediate pointers to plug leak on realloc
And save worktree_branch_len for reuse.
ok stsp@ and op@
- Commit:
188f8dcf2c1c15bf37859e3b587bc6331fd5a097
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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
- Commit:
27749ea2ddbc482ad434ed865e0f855313db0a27
- From:
- Omar Polo <op@omarpolo.com>
- Date:
got-read-gitconfig: send key-value pairs for extensions
Most extension allow only for a boolean value so the current behaviour
of just sending the extension with a trueish value is fine. However,
some extensions that we could eventually support (like "objectformat")
have a string value. This is a preparatory step towards that.
ok stsp@