|
b2832778
|
2022-04-23T10:39:47
|
|
got-read-patch: preserve all \ lines
as a cheap optimization got-read-patch was sending only the "\ No
newline at end of file" lines that follows an addition (a "+" line). To
be able to reverse patches in the future got_patch needs to know about
all of these lines instead. No functional changes intended.
ok stsp@
|
|
d7b5a0e8
|
2022-04-20T14:00:12
|
|
inline struct got_object_id in struct got_object_qid
Saves us from doing a malloc/free call for every item on the list.
ok op@
|
|
9d6cabd5
|
2022-04-07T09:28:59
|
|
got patch: allow to strip path components
Move some bits from the libexec helper to the main process so we know if
the patch was generated by git or not and finally document the automatic
stripping of a/ and b/ prefixes added by git-diff(1).
ok stsp@
|
|
c0591751
|
2022-03-24T12:17:45
|
|
link libexec helpers against _p libraries when building with 'make PROFILE=1'
|
|
e260f8ae
|
2022-03-22T11:55:38
|
|
fgetc() returns int, not char; fixes -Werror build on armv7
|
|
b3c57ab2
|
2022-03-22T11:20:46
|
|
got patch: handle "\ No newline at end of file"
|
|
7a30b5cb
|
2022-03-20T08:54:45
|
|
got patch: prefer new name if not /dev/null and not a git-style diff
This fixes a common issue when for e.g. generating patches with
$ diff -u foo.orig foo
where 'got patch' failed because 'foo.orig' has an 'unexpected status'.
prodded by naddy, ok stsp
|
|
d58ddaf3
|
2022-03-17T20:02:40
|
|
const-ify tables
ok thomas_adam millert
|
|
46ebad13
|
2022-03-17T16:38:43
|
|
style
|
|
423faaa6
|
2022-03-12T16:01:09
|
|
got-read-patch: plug memory leak
|
|
e9ce266e
|
2022-03-07T22:26:08
|
|
add `got patch' command for applying unified diffs
|
|
bed00385
|
2022-02-23T12:29:32
|
|
apply time-based rate-limiting to got-send-pack upload progress output
|
|
dcb64fea
|
2022-02-23T12:24:25
|
|
apply time-based rate-limiting to got-fetch-pack download progress output
|
|
d0f1e2f1
|
2022-02-23T12:13:03
|
|
apply time-based rate-limiting to got-index-pack progress output
|
|
67fd6849
|
2022-02-13T00:10:25
|
|
reuse existing deltas when creating pack files
tested by thomas, naddy, and myself
|
|
db696021
|
2022-01-04T16:11:52
|
|
avoid the creation of new temporary files whenever a packed object is read
This speeds up the creation of pack files by about 30%.
|
|
c0df5966
|
2021-12-31T09:33:01
|
|
wrap overlong lines
|
|
8347f8e7
|
2021-10-15T17:17:52
|
|
plug memory leak in an error path of read_packed_object()
|
|
07965a0d
|
2021-10-15T17:08:54
|
|
fix wrong function names in error messages from got-index-pack.c
|
|
0c82d267
|
2021-10-15T15:18:30
|
|
sync with OpenBSD parse.y
Explicitly cast "char" to "unsigned char" when assigned to "int"
to prevent sign extension from breaking comparions against EOF or
passing invalid arguments to ctype functions.
|
|
e99d9267
|
2021-10-07T15:29:27
|
|
plug memory leaks in got-fetch-pack and got-send-pack
ok naddy
|
|
dd088d95
|
2021-10-06T19:49:06
|
|
let 'got fetch' send all references to the server to avoid redundant downloads
Problem reported by naddy.
ok naddy
|
|
5d8cbca3
|
2021-09-29T19:53:08
|
|
pull in a type fix from the OpenBSD parse.y template
Original commit message by deraadt:
(unsigned) means (unsigned int) which on ptrdiff_t or size_t or other
larger types really is a range reduction...
Almost any cast to (unsigned) is a bug.
|
|
14af9299
|
2021-09-28T19:21:34
|
|
fix unsigned/signed char mismatch in parse.y
ok stsp
|
|
474b4982
|
2021-09-25T10:26:25
|
|
whitespace fix from Omar Polo
|
|
030daac8
|
2021-09-25T10:26:13
|
|
fix some integers that had a slightly wrong type; patch by Omar Polo
|
|
50127d69
|
2021-09-25T10:24:15
|
|
add 'static' qualifier to local functions in got-read-pack; patch by Omar Polo
|
|
fda3525e
|
2021-09-25T10:23:12
|
|
mark some function parameters as 'const', as they should be; patch by Omar Polo
|
|
77d7d3bb
|
2021-09-05T20:39:50
|
|
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.
|
|
abc59930
|
2021-09-05T19:41:03
|
|
indentation fixes
|
|
bd3d9e54
|
2021-09-05T14:21:02
|
|
move more code used by got-send-pack and got-fetch-pack to a common file
Move functions and data structures which implement Git protocol features
required for fetching and sending pack files to new files lib/gitproto.c
and lib/got_lib_gitproto.h.
This code was duplicated in got-fetch-pack and got-send-pack.
No functional change.
|
|
f024663d
|
2021-09-05T13:50:39
|
|
move pkt code used by got-fetch-pack and got-send-pack to a common file
The Git protocol uses a simple packet framing format. The got-fetch-pack
and got-send-pack programs contained identical copies of functions to
support this format. Move related functions to new file lib/pkt.c and
link both programs against this common implementation.
No functional change.
|
|
c2d7bc3f
|
2021-08-31T19:11:16
|
|
remove superfluous strdup(3) from parse.y files; Patch by Martin Vahlensieck
|
|
93f8a337
|
2021-08-30T16:34:04
|
|
tweak implementation of separate send {} and fetch {} conf blocks
Tweak man page.
Factor out repeated code in if/else branches in send_gotconfig_remotes().
ok stsp@
|
|
f08eaca0
|
2021-08-30T15:59:11
|
|
reintroduce allowing empty fetch and send blocks with correct grammar. ok stsp@
|
|
6480c871
|
2021-08-30T15:51:23
|
|
provide separate send {} and fetch {} configuration blocks in got.conf
Feature requested by naddy.
ok naddy, who also suggested some tweaks that will arrive shortly
|
|
92952c0e
|
2021-08-30T12:33:22
|
|
stop allowing empty send {} or fetch {} blocks; yacc complained about grammar
yacc has been complaining about "shift/reduce conflicts" since
commit 16c4be8c1cab9456f9dd0468c27f8ab73235737e
Revert that change for now. Not sure how it can be done properly.
In any case, allowing empty config blocks is not very important.
|
|
7c84ef07
|
2021-08-29T19:50:57
|
|
reject port number zero
|
|
f1cacac7
|
2021-08-29T17:07:49
|
|
validate non-optional settings in send {} and fetch {} config blocks.
|
|
aaf30ee7
|
2021-08-29T17:07:24
|
|
rename variables to avoid too much repetition of the term 'repo'
|
|
27b75514
|
2021-08-28T10:46:51
|
|
do not send a pack file when 'got send' is only deleting branches
The git protocol spec says the client MUST NOT send a pack file
if the only command used is 'delete'.
Fixes 'got send -d' against Github's server which closed the session
upon receiving the empty pack file we sent. This problem wasn't caught
by regression tests since git-daemon does accept an empty pack file.
Problem reported by jrick.
|
|
2ae2891d
|
2021-08-28T10:23:24
|
|
remove github capabilities workaround from got-send-pack, it is not needed
This workaround was inherited from git9, which claims that Github did
not send capabilities. Protocol traces show that Github's server does
in fact advertise its capabilities. Git protocol capabilities are hidden
behind a NUL byte in the middle of the first refline sent by the server.
This makes them easy to miss when treating a refline as a C string.
I guess this is why Ori concluded that Github didn't send any capabilities.
Or perhaps Github has been fixed since.
|
|
26ac815f
|
2021-08-27T19:48:23
|
|
remove unused name variables, noticed by naddy@
|
|
0ff2bf46
|
2021-08-27T19:37:15
|
|
clean up weird grammar. not sure what i was thinking.
|
|
16c4be8c
|
2021-08-27T19:32:56
|
|
fix to allow empty send and fetch blocks, ok stsp@
|
|
cfd92333
|
2021-08-27T16:58:26
|
|
add send and fetch plumbing to parser for got.conf
This is the beginning of support for naddy's suggestion to break this out
similar to git. More code to come from stsp.
ok stsp@
|
|
f8a36e22
|
2021-08-26T12:30:42
|
|
add 'got send' command for sending changes to remote repositories
Known to work against git-daemon and github Git server implementations.
Tests by abieber, naddy, jrick, and myself.
Man page additions reviewed by Lucas.
|
|
8991a328
|
2021-08-26T07:08:48
|
|
add a missing bounds-check in got-fetch-pack when parsing server response
The tokenize_refline() function could end up reading past the end of
the buffer if the refline is not terminated with whitespace or \0.
|
|
a90356f7
|
2021-08-26T07:01:34
|
|
prevent NULL deref in got-fetch-pack if server does not announce capabilities
The my_capabilities pointer may remain NULL. Check for NULL before use.
|
|
14d2b281
|
2021-08-25T21:40:38
|
|
fix the error message shown when the server sends a bad ref line
Exposed by trying to run got clone -l against shithub.us over git://
found by abieber@
|
|
9ca26ac3
|
2021-08-06T13:31:40
|
|
style fix: avoid comparison of pointer variable against 0 in got-fetch-pack
|
|
c3564dfa
|
2021-07-15T07:48:40
|
|
don't scan pack index offsets for large values if pack file is < 2GB
This saves an iteration over the entire h->offsets array when opening
a pack index which should not contain large offsets in the first place.
ok millert@
|
|
d5c81d44
|
2021-07-08T11:03:29
|
|
verify object ID checksums while loose objects are being accessed
|
|
12f2167a
|
2021-07-04T16:24:52
|
|
add checksum parameters to got_inflate functions which did not provide them yet
|
|
dbdddfee
|
2021-06-23T20:48:35
|
|
switch from SIMPLEQ to equivalent STAILQ macros
The singly-linked tail queue macros were added to OpenBSD 6.9 and
are more widely available on other systems.
ok stsp
|
|
40e3cb72
|
2021-06-22T19:01:44
|
|
fix raw object size sent by got-read-pack
|
|
a8591711
|
2021-06-18T13:52:26
|
|
raw object size should not include the length of the object's header
This way, the size of a raw object is the same regardless of whether
the object was found in a loose object file or in a pack file.
|
|
282f42e5
|
2021-06-05T09:51:24
|
|
remove stray debug print which was accidentally committed
|
|
e5ad7365
|
2021-05-20T09:51:59
|
|
fix file descriptor leak when got-read-object returns a raw object
|
|
59d1e4a0
|
2021-03-10T22:49:22
|
|
implement raw object data access; this will be required for packing
|
|
08578a35
|
2021-01-22T11:05:05
|
|
make close(2) failure checks consistent; check 'close() == -1' everywhere
ok millert, naddy
|
|
56b63ca4
|
2021-01-22T11:04:47
|
|
make fclose(3) failure checks consistent; check 'fclose() == EOF' everywhere
ok millert, naddy
|
|
99495ddb
|
2021-01-10T23:48:51
|
|
add a 'reference' directive to remote repositories in got.conf(5)
Make use of this in 'got clone' to persist -R option arguments given on
the command line in the cloned repository's got.conf(5) file.
|
|
0c8b29c5
|
2021-01-05T17:22:14
|
|
add a 'fetch-all-branches' configuration setting to got.conf(5)
Set fetch-all-branches in the got.conf(5) file created by 'got clone -a'
in order to make a future 'got fetch' act like 'got fetch -a' by default.
|
|
98f64f14
|
2021-01-05T17:17:58
|
|
work around spurious ACK responses from git servers in got-fetch-pack
The Git server can apparently send duplicate ACK responses even though we
do not enable the multi_ack capability. According to the Git protocol docs
the server should only send ACKs after receiving 'done' from the client if
multi_ack has been enabled.
However, a duplicate ACK response can be triggered by running 'got fetch -a'
in our fetch_update_tag test. This resulted in the following error:
got-fetch-pack: unknown side-band received from server
got: bad packet received
|
|
85f4e1e7
|
2020-12-17T16:17:51
|
|
fix the type of variable 'idx' in update_packidx()
|
|
6059809a
|
2020-12-17T15:54:47
|
|
use size_t for loop indices to avoid signedness warnings; by emaste@freebsd
Same change as 16aeacf7088d, for subdirectories other than lib/
|
|
20b7abb3
|
2020-10-22T20:36:23
|
|
detect unknown repository format extensions (such as sha256 format)
ok millert
|
|
62d463ca
|
2020-10-20T22:43:59
|
|
indentation fixes
|
|
1367695b
|
2020-09-26T20:53:13
|
|
fix potential type mismatches between format specifiers and arguments
Cast printf arguments of type time_t and off_t to long long to match
the %lld format specifier on platforms where this might not be the
case. In parse.y, switch the number variable to long long because
all its interactions are with that type anyway.
ok millert stsp
|
|
b8adfa55
|
2020-09-25T21:35:10
|
|
add "branch" keyword to got.conf which specifies a list of branches to fetch
ok tracey
|
|
5e082626
|
2020-09-24T10:51:21
|
|
remove redundant leading slashes from repository path parsed from got.conf
|
|
6c13dcd2
|
2020-09-18T18:24:09
|
|
send gitconfig imsg string values the same way as gotconfig ones are sent
|
|
be96c417
|
2020-09-17T11:51:59
|
|
fix got.conf overriding GOT_AUTHOR even if no author is set in got.conf
|
|
8de9818a
|
2020-09-14T20:12:18
|
|
remove unused #includes from the new got-read-gotconfig/parse.y
ok tracey
|
|
e12e0e21
|
2020-09-14T17:53:41
|
|
do not rely on <zlib.h> to pull in <unistd.h>
|
|
23c57b28
|
2020-09-11T19:44:18
|
|
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
|
|
53dfa00d
|
2020-09-10T19:54:33
|
|
initialize variable in got-read-gotconfig to fix SIGBUS in free(3) on sparc64
|
|
3168e5da
|
2020-09-10T00:10:55
|
|
zap trailing tabs
|
|
257add31
|
2020-09-09T23:57:40
|
|
add got.conf(5) configuration file
ok tracey
|
|
78fb0967
|
2020-09-09T21:41:22
|
|
use the POSIX standard endian functions and explicitly include <endian.h>
ok stsp
|
|
81a12da5
|
2020-09-09T19:35:32
|
|
do not rely on <zlib.h> to pull in <unistd.h>
ok stsp
|
|
631179de
|
2020-07-31T14:10:44
|
|
Fix missing block grouping.
ok tracey stsp
|
|
00927983
|
2020-04-19T09:11:37
|
|
remove got_packidx_get_object_idx_sha1(); it is not actually needed
|
|
ded8fbb8
|
2020-04-19T08:57:07
|
|
include the relevant object ID in NO_OBJ error messages where possible
|
|
3abebdc2
|
2020-03-24T15:24:08
|
|
make got-index-pack check the expected pack checksum passed from main process
|
|
6ad68bce
|
2020-03-24T15:15:51
|
|
make got-index-pack compute and verify the pack file's SHA1 checksum
|
|
1d72a2a0
|
2020-03-24T14:08:03
|
|
represent packfile hash as byte array in the privsep layer, not as object ID
|
|
dc671e91
|
2020-03-24T12:07:58
|
|
compute pack file's checksum during download and check it in got-fetch-pack
Compared to the previous version committed in 520a0c97 this code should
compute the checksum correctly for any amount of pack file data bytes
read from the socket at a time.
|
|
729743d1
|
2020-03-23T21:34:06
|
|
revert 520a0c97f8081e4531fc9c88cda705a92afbddaf for now due to possible bug
|
|
520a0c97
|
2020-03-23T21:08:17
|
|
compute pack file's checksum during download and check it in got-fetch-pack
|
|
e70bf110
|
2020-03-22T17:20:18
|
|
move functions from privsep.c to the helpers which use them where possible
|
|
0e4002ca
|
2020-03-21T21:49:13
|
|
add support for fetching arbitrary references to 'got clone' and 'got fetch'
|
|
2690194b
|
2020-03-21T18:17:12
|
|
remove GOT_FETCH_DEBUG and toggle fetch debug output with -v option instead
|
|
0bec957e
|
2020-03-21T17:28:23
|
|
close fetchfd when we're done in got-fetch-pack
|
|
4515a796
|
2020-03-21T11:24:14
|
|
make 'clone -l' and 'fetch -l' list all references, regardless of namespace
|
|
41b0de12
|
2020-03-21T10:18:15
|
|
add support for listing remote branches and tags to 'got clone' and 'got fetch'
|
|
4ba14133
|
2020-03-20T20:23:18
|
|
add support for fetching specific branches to 'got clone' and 'got fetch'
|
|
659e7fbd
|
2020-03-20T15:55:08
|
|
fetch only HEAD branch and tags by default; add -a option to fetch everything
|
|
469dd726
|
2020-03-20T11:44:14
|
|
add support for repository mirrors to 'got clone' and 'got fetch'
|