Commit Briefs

9ec58fff16 Stefan Sperling

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


f270548637 Christian Weisgerber

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


4d9042b347 Stefan Sperling

fix error checking in dial_ssh()


08578a35f6 Stefan Sperling

make close(2) failure checks consistent; check 'close() == -1' everywhere

ok millert, naddy


d9dff0e5c6 Stefan Sperling

switch reflist to TAILQ; insert elements more efficiently for sorted input

ok naddy


ccf6dd5ee6 Stefan Sperling

avoid signed vs unsigned comparisons in fetch.c

ssizeof() macro idea courtesy of millert@ ok millert@



0843a4ce46 Sebastien marie

use fchmod(2) instead of chmod(2). it is less racy, and we just opened the descriptor.

ok naddy@ stsp@






23c57b285f Christian Weisgerber

Stop including <sys/syslimits.h> directly.

POSIX says the limits defined there are available from <limits.h>, which almost all affected source files already included anyway. ok millert stsp


78fb09675b Christian Weisgerber

use the POSIX standard endian functions and explicitly include <endian.h>

ok stsp


81a12da586 Christian Weisgerber

do not rely on <zlib.h> to pull in <unistd.h>

ok stsp


59d5e252ce Sebastien marie

don't override port configuration with explicit argument if the url doesn't contains it

it permits to .ssh/config to be honored same diff from stsp@


465971eec9 Stefan Sperling

stop verifying pack file checksum in the main process during clone/fetch

Both got-fetch-pack and got-index-pack now verify the pack file checksum. This means we can avoid reading the entire pack file in the main process just to verify its checksum and avoid a noticable stall between fetching and indexing on slow machines.







9c52365fc3 Stefan Sperling

properly terminate the ssh process after fetching via SSH