Commits
- 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:
a3287e9971f6990ab19426fccf0b41a9b6bc4b68
- From:
- Omar Polo <op@omarpolo.com>
- Date:
plug leak in got_fetch_pack error path
set err and goto done instead of an early return that leaks various
things.
ok jrick
- Commit:
1eb3899277955a87d80eef900b6ea458ff73bd6c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
significantly reduce the amount of code linked into gitwrapper
By moving got_serve_parse_command() from lib/serve.c into lib/dial.c
as got_dial_parse_command(), we can significantly reduce the amount
of symbols gitwrapper depends on indirectly.
As a downside, gotsh now needs to link to dial.c. But it only uses the
same parsing routine, and any other routines in dial.c would likely
cause pledge violations in gotsh if used.
No functional change.
- 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:
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:
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:
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:
d8bacb933720b8819f0c4e76b004775aa1885b9b
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
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@
- Commit:
b90054ed55f30ebe28115abf5ad9cecc2b925713
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use mkstemps(3) instead of mkstemp(3) for opening named temporary files
Allows 'got commit' to use a ".diff" suffix for temporary diff files.
ok op@
- Commit:
5e91dae4dd43b8024731223110ab18f505f453ac
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove trailing whitespace; patch by Josiah Frentsos
- Commit:
bc5e881ab9b3f23c4c4d00845d2e553d4fcd7e56
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
plug a memory leak in got_fetch_pack(); patch by Mikhail
- Commit:
8934ea8b1b31166ea1f3f857e6f51f8dd6a999a2
- From:
- Omar Polo <op@omarpolo.com>
- Date:
factorize imsg_clear calls after imsg_flush failures
imsg_clear frees and closes resources allocated as part of enqueueing
imsgs so it's a no-op after reads.
discussed with and ok stsp@
- Commit:
688fe08b75a31d11eaf64a44751f903bdfa61b68
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix fd leak in got_fetch_pack, ok stsp@
- Commit:
197088a4e27004293735c7fc011bb92e1bf8fe75
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
whitespace
- Commit:
f8b19efda6453501f8bc4ce868f953b703dca576
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use RB_TREE instead of STAILQ to manage packindex bloom filters; much faster
- Commit:
dd088d9503d8e7cebbb30c535d8e4d11556c8d30
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
let 'got fetch' send all references to the server to avoid redundant downloads
Problem reported by naddy.
ok naddy
- Commit:
965803d33ff4b7472b22868076e8cbc13b069218
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix 'got fetch' downloading too many objects in some cases
Always announce all local references to the server when fetching changes.
We used to do this only in mirror mode. In regular mode only refs/tags
and refs/remotes/origin were announced, which could result in unnecessary
downloads if relevant objects exist in refs/heads or elsewhere.
- Commit:
5e5da8c4bcc83f7737a115b8da52fc3935fe3a6b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
rename got_fetch_parse_uri() to got_dial_parse_uri()
This function is now being used by both 'got fetch' and 'got send' so
its former name was misleading.
- Commit:
77d7d3bb1aabafae6c020c8a07a6e9f4f7885c9b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
de-duplicate a constant used by both 'got fetch' and 'got send'
Both GOT_FETCH_PKTMAX and GOT_SEND_PKTMAX had the same value.
Declare this value as GOT_PKT_MAX in got_lib_pkt.h instead.
- Commit:
d65a88a2f0db40d2c2ac34ee34e8aff8ac629d52
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
move duplicated dial_ssh() and dial_git() functions into a common file
These functions are used by 'got send' and 'got fetch' in order to
open network connections to a server. Move them into new file lib/dial.c
and declare relevant functions in got_dial.h and lib/got_lib_dial.h.
No functional change.
- Commit:
9ec58fff16b1c2fc1d33d9955b42cadaa9e26f29
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use socketpair(2) instead of pipe(2) for bi-directional communication
On Linux, pipes returned from pipe(2) only work in one direction.
This broke 'got clone' over ssh in the -portable version because
got-fetch-pack assumes it can use its fetchfd for both reading and writing.
I wrote a complicated diff to use two pipe(2) calls instead of one, but
millert suggested a simpler solution: Use socketpair(2) instead of pipe(2).
ok millert jrick tracey
- Commit:
f270548637fc35b5b9576bd91ac1bdcbffb1f039
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
dial_git(): fix memory leak and simplify
Simplify dial_git() by formatting the initial Git protocol packet
with dprintf, suggested by millert, and stop leaking an asprintf
buffer.
ok stsp
- Commit:
4d9042b347e757448bd0dff60537fe57e1af5ad1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix error checking in dial_ssh()
- Commit:
08578a35f60be8657db97b705f27a55ab61850c8
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make close(2) failure checks consistent; check 'close() == -1' everywhere
ok millert, naddy