|
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
|
|
5de743f8
|
2021-08-29T13:15:27
|
|
fix seek to incorrect offset in the delta base when creating deltas
The stretchblk() function needs to compare data located after the block
which has just been matched. However, upon entry it was resetting the
file pointer of the delta base to the beginning(!) of the block.
The other file is correctly positioned after the block.
In many cases the data won't match and stretchblk() will not stretch
the matched block. But when the data did happen to match this resulted
in a bogus delta, and wrong file contents when the delta was applied.
Fix this by setting the delta base file pointer to end of the block.
Problem reported by naddy after our server refused a pack file which
was sent by 'got send'. I could reproduce the issue by running the
'gotadmin pack' command on a copy of naddy's repository.
ok naddy
|
|
535e07c7
|
2021-08-29T13:09:21
|
|
make realloc_ids() malloc-like and do not overallocate
Let realloc_ids() take as argument the number of entries to allocate.
Do not allocate an extra chunk.
ok stsp
|
|
8f2a2f4f
|
2021-08-29T11:51:43
|
|
drop realloc_ids() initialization calls, one of which had a typo
realloc_ids() is called again in the loops that assign to the ID arrays,
before the first assignment.
ok stsp
|
|
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.
|
|
1bd76734
|
2021-08-26T13:41:59
|
|
fix the output of 'got send -d' upon success
Previous output was: Already up-to-date
New output is: Server has deleted refs/heads/branch
Check this behavour in the related regression test.
|
|
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.
|
|
63e5aa5c
|
2021-08-23T10:51:48
|
|
Expose got_ref_name_is_valid() for general purpose use.
This will be needed for a future 'got send' command.
|
|
dc7edd42
|
2021-08-22T12:58:34
|
|
fix miscalculation of the final pack file size reported by got_pack_create()
|
|
cce2f485
|
2021-08-22T12:56:14
|
|
expose got_ref_resolve_symbolic() at the public library API
This will be needed by a future 'got send' command.
|
|
0af64e86
|
2021-08-22T12:54:21
|
|
plug a memory leak in an error path of got_deltify()
|
|
dd29967c
|
2021-08-22T12:53:22
|
|
make got_deltify() rellocate the deltas array less often
|
|
72acb3d8
|
2021-08-06T12:43:33
|
|
remove unused 'repo' argument from got_reflist_insert()
|
|
b9c41b54
|
2021-08-03T08:08:03
|
|
use less memory allocations when formatting log messages
Rewrite got_object_commit_get_logmsg() such that only one memory
allocation is made when creating a pretty version of a log message.
ok naddy@
|
|
ef8ec606
|
2021-07-27T13:08:52
|
|
prevent a race where 'gotadmin cleanup' deletes concurrently created objects
|
|
3f338f0a
|
2021-07-27T13:08:51
|
|
track the last modification time of references
|
|
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
|
|
4f655d1b
|
2021-07-08T10:37:01
|
|
sync files from diff.git 9879b82a581a245e365fb159488c4294c318d8b3
|
|
ff56836b
|
2021-07-08T10:30:10
|
|
Make 'got add' always require the -I option in order to add ignored files.
|
|
1124fe40
|
2021-07-07T17:21:52
|
|
handle pack index files which lack a corresponding pack file
ok millert
|
|
aea75d87
|
2021-07-06T07:57:00
|
|
make got_packidx_get_packfile_path() usable for callers who only have a path
|
|
5345b4c7
|
2021-07-06T07:39:36
|
|
allow lockfiles to be used in cases where we have a dir_fd and a relative path
|
|
12f2167a
|
2021-07-04T16:24:52
|
|
add checksum parameters to got_inflate functions which did not provide them yet
|
|
9614da0d
|
2021-07-04T10:27:59
|
|
avoid searching the pack index twice in 'gotadmin cleanup'
|
|
2252c019
|
2021-07-03T22:55:27
|
|
Update a code comment regarding support of the preciousObjects extension.
|
|
9188bd78
|
2021-07-03T22:51:03
|
|
add support for the preciousObjects Git extension to 'gotadmin cleanup'
|
|
4b2e47fb
|
2021-07-03T19:49:37
|
|
fix memory leak in error path of load_commit_or_tag()
|
|
b3d68e7f
|
2021-07-03T19:49:37
|
|
implement 'gotadmin cleanup'
|
|
07165b17
|
2021-07-01T14:57:10
|
|
cache object type in memory to speed up packing of objects referenced by tags
|
|
ae23ce34
|
2021-07-01T14:57:10
|
|
fix inverted check guarding recallocarray() calls in get_reflist_object_ids()
|
|
372b6d8e
|
2021-07-01T14:30:26
|
|
remove unused function got_object_idset_lookup_data(); same code as idset_get()
|
|
f4a2ff2d
|
2021-07-01T14:10:33
|
|
fix out-of-bounds access in 'gotadmin pack'; wrong array pointer in read_meta()
|
|
2c41dce7
|
2021-06-27T15:30:08
|
|
allow obstructed files skipped by 'got update' to be updated again
|
|
a769b60b
|
2021-06-27T09:22:52
|
|
fix a bug where files skipped by 'got update' could not be updated again
ok semarie@
|
|
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
|
|
c8d1f14f
|
2021-06-23T15:39:58
|
|
explicitly include <endian.h> for be32toh()
|
|
08736cf9
|
2021-06-23T10:16:23
|
|
fix imsg header includes in pack_create.c
|
|
f6343036
|
2021-06-22T20:00:44
|
|
new -I option for 'got status' to show files which match an ignore pattern
|
|
05118f5a
|
2021-06-22T19:37:20
|
|
implement gotadmin pack, indexpack, and listpack commands
|
|
e6bcace5
|
2021-06-22T19:34:53
|
|
initial port of git9's pack file creation code to gameoftrees; thank you, Ori!
|
|
136ec6c9
|
2021-06-22T19:18:55
|
|
forward-declare struct got_packidx to make got_lib_pack.h self-contained
|
|
c4330eff
|
2021-06-22T19:11:54
|
|
expose got_pack_parse_ref_delta() for library-internal use
This will be needed by a future 'gotadmin listpack' command.
|
|
02828bfd
|
2021-06-22T19:05:05
|
|
expose got_packidx_get_object_offset() for library-internal use
This will be needed by a future 'gotadmin listpack' command.
|
|
1c4cdd89
|
2021-06-20T21:07:54
|
|
fix bogus 'permission denied' error when a file at work tree root is removed
ok naddy
|
|
b4f37570
|
2021-06-19T16:32:39
|
|
mark got_pack_stop_privsep_child() static; it is only used inside pack.c
|
|
cc2a8ef4
|
2021-06-19T16:12:52
|
|
fix a leaky ibuf. ok stsp
|
|
779e1159
|
2021-06-18T14:14:49
|
|
expose the reflist_insert() helper function as got_reflist_insert()
This will be needed by 'gotadmin pack'.
|
|
9a8dc2b3
|
2021-06-18T14:10:55
|
|
fix deltas with trailing data that is smaller than the minimum chunk size
|
|
740bba1c
|
2021-06-18T14:07:35
|
|
allow the delta base file to lose its header between deltify_init and deltify
This simplifies pack file creation. A delta base could be read from a
loose object, a packfile, or it might be available in a temporary file.
All these cases can now be handled the same way. We may need to open,
close, and re-open a given delta base multiple times while packing.
|
|
7550e799
|
2021-06-18T13:59:46
|
|
check for errors from emitdelta() in got_deltify()
|
|
aa51f4a4
|
2021-06-18T13:57:59
|
|
handle fseek in got_deltify() instead of in stretchblk(); simplifies the code
|
|
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.
|
|
9ca9aafb
|
2021-06-18T13:36:51
|
|
introduce got_object_id_queue_copy()
This will be required by a future 'gotadmin pack' command.
|
|
74a2356f
|
2021-06-18T13:34:45
|
|
add a user data pointer to struct got_object_qid
This will be required by a future 'gotadmin pack' command.
|
|
f34b169e
|
2021-06-18T13:28:25
|
|
Allow for skipping the base object header in got_deltify().
|
|
9ec58fff
|
2021-06-17T15:41:49
|
|
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
|
|
fdf3c2d3
|
2021-06-17T09:01:05
|
|
use Patience diff for merging during cherrypick/backout/histedit/rebase
This has been shown to prevent mis-merges in some cases. It's probably
not a final solution. We should look at what Git's "recursive merge"
is doing and implement something similar.
Keep using Myers during update/unstage. The advantage of Myers is that
it produces smaller conflict chunks, and there are no known cases of
mis-merges which affect update/unstage.
|
|
1d0f4054
|
2021-06-17T08:56:43
|
|
check for close(2) error in got_repo_close() and propagate errors up
ok tracey
|
|
991ff1aa
|
2021-06-15T22:16:22
|
|
close all opened repo->gitdir_fd's and set open_repo static. ok naddy (with static change)
|
|
0d15f6dc
|
2021-06-13T17:03:59
|
|
in addblk(), only read data into buffer1 if we will compare it to buffer2
suggested by and ok naddy@
|
|
68bdcdc2
|
2021-06-11T17:10:50
|
|
addblk() may seek in its input file; reposition the file pointer afterwards
|
|
a893025f
|
2021-06-11T17:02:57
|
|
addblk: iterate over the correct number of entries after growing the array
ok naddy
|
|
e89540a9
|
2021-06-11T17:02:13
|
|
addblk: be more careful about expanding the blocks array when we outgrow it
fixes + ok naddy
|
|
51a494da
|
2021-06-11T17:00:02
|
|
check a block's hash as well as its length before expensive comparisons
suggested by + ok naddy, and Ori agrees
|
|
0c9eeee2
|
2021-06-05T09:32:56
|
|
avoid uninitialized error being returned from got_repo_get_packfile_info()
|
|
3b9e6fcf
|
2021-06-05T09:28:54
|
|
simplify deflate checksumming code; fixes errors with upcoming 'gotadmin pack'
tweak + ok naddy
|
|
54d5be07
|
2021-06-03T13:12:58
|
|
fix unrelated changes being merged by got cherrypick/backout/rebase/histedit
This was a long-standing and very annoying bug.
The two xfail tests in the cherrypick test suite are passing now.
|
|
1af628f4
|
2021-06-03T12:38:42
|
|
switch merge_file_cb() to using merge_file() instead of merge_blob()
|
|
eec2f5a9
|
2021-06-03T12:14:35
|
|
decouple merge_file() parameters for 2nd derived version and merge target file
|
|
dc082d4a
|
2021-06-03T11:57:58
|
|
in merge_file(), remove allocation of a base_path which is unused
|
|
07bb0f93
|
2021-06-02T09:26:42
|
|
move merge_file()'s f_deriv parameter next to the f_orig parameter
|
|
db590691
|
2021-06-02T09:24:51
|
|
make merge_file() accept FILEs instead of paths for orig and deriv inputs
|
|
67a66647
|
2021-05-31T09:20:56
|
|
refactor merge_file() such that it no longer requires a blob object parameter
|
|
f2705486
|
2021-05-30T15:37:51
|
|
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
|
|
57c18198
|
2021-05-24T18:25:19
|
|
validate reference names in open_ref()
This catches invalid reference names passed to 'got ref -l' and will also be
needed to validate reference names passed to a future 'gotadmin pack' command.
ok naddy@
|
|
91b40e30
|
2021-05-21T20:20:28
|
|
add checksum support to got_deflate_to_file()
This will eventually be used by 'gotadmin pack'.
Checksum init and finalization will need to be done by the caller
since many objects will be written out in compressed form while
we are computing checksums across the entire pack file.
ok millert, naddy
|
|
af8a5c4a
|
2021-05-21T20:16:17
|
|
plug a memory leak in got_ref_list_free()
Code which inserts a reference into a reflist passes ownership of
this reference to the list. However, got_ref_list_free() never
closed such references, which resulted in a memory leak.
ok tracey
|
|
9069347b
|
2021-05-20T09:58:35
|
|
improve error reporting when delta application fails
|
|
dbbf4a5f
|
2021-05-20T09:51:59
|
|
allow got_deltify_free(NULL); will be needed by 'gotadmin pack'
|
|
932dbee7
|
2021-05-19T13:58:22
|
|
fix wrong function name in error message; pointed out by Mikolaj Kucharski
|
|
a486b62b
|
2021-05-18T13:17:12
|
|
ignore SIGWINCH while polling in the main process
Avoids an error where tog(1) would exit with "poll: Interrupted system call"
while the terminal window was being resized.
ok millert
|
|
a3af57b8
|
2021-05-10T11:26:06
|
|
remove unused worktree-related includes from lib/repository.c
|
|
1fee9f40
|
2021-04-13T08:28:24
|
|
fix 3-way merge of files which lack a final \n
problem found by jrick
ok millert
|
|
20662ea0
|
2021-04-10T13:31:30
|
|
introduce 'gotadmin info'
|
|
762d73f4
|
2021-04-10T13:13:56
|
|
introduce got_object_open_loose_fd() for library-internal use
|
|
509c9973
|
2021-04-10T13:11:17
|
|
add got_packidx_get_packfile_path() for library-internal use
|
|
c6e8a826
|
2021-04-05T17:55:12
|
|
do not update symlinks which are already up-to-date
This fixes spurious 'U' notifications for symlinks during 'got update'
that occurred even when the work tree was fully up-to-date.
Observed on a work tree of the FreeBSD src repo and reproduced in our
test suite by adding a no-op update at the end of a test which deals
with updating symlinks.
|
|
0f58026f
|
2021-04-05T17:51:07
|
|
add a missing STATUS_EXISTS notification in update_blob()
|
|
7495ec13
|
2021-04-04T14:24:39
|
|
fix open file descriptor leak in error path of read_object_header_privsep()
|
|
ac62b712
|
2021-03-30T14:50:44
|
|
when reading a pack index byte-swap fields at compile-time where possible
suggested by mpi@ ages ago
|
|
6c414261
|
2021-03-30T01:26:42
|
|
cap pack file cache size at 1/8 of the current open file desciptor limit
|
|
61303e6e
|
2021-03-30T01:22:29
|
|
fix off-by-one in got_repo_cache_pack()
|
|
159a21e5
|
2021-03-30T00:48:38
|
|
increase pack index cache size from 16 to 64 to improve performance
This can make a huge difference on repositories which contain more than
16 pack files, at the expense of additional open file handles.
My test case was a ports.git repository with > 60 pack files (these
accumulate due to 'got fetch', and 'git repack -a' would condense them).
With cache size 16 'got update' in /usr/ports took more than 60 seconds.
With cache size 64 the same command took less than 5 seconds.
The root cause is probably that mapping and unmapping large files over
and over again is expensive on OpenBSD.
|
|
4d9042b3
|
2021-03-24T14:17:56
|
|
fix error checking in dial_ssh()
|
|
4cc1f028
|
2021-03-23T15:01:29
|
|
fix use of an uninitialized stat buffer during work tree status crawl
found by naddy
ok naddy jrick
|
|
22403ab7
|
2021-03-22T16:20:51
|
|
deltify.c: explicitly include <endian.h> for be64toh()
|
|
e600f124
|
2021-03-21T19:09:35
|
|
ensure that old commits remain referenced after rebase and histedit
Create automatic "backup" references which ensure that objects from
the pre-rebase or pre-histedit state remain in the repository.
A new -l option for 'got rebase' and 'got histedit' lists old commits.
This makes it easier to recover from botched rebase or histedit operations.
Removal of such objects currently requires got ref -d and git-gc.
This will be made more convenient in the future.
testing and ok jrick
|
|
59d1e4a0
|
2021-03-10T22:49:22
|
|
implement raw object data access; this will be required for packing
|
|
69aa0e90
|
2021-03-10T22:49:21
|
|
substantial rewrite of deltify.c; operate on plain files only
|