|
4027dbc2
|
2022-03-22T11:20:46
|
|
reuse apply_hunk in patch_file when creating a file
|
|
b3c57ab2
|
2022-03-22T11:20:46
|
|
got patch: handle "\ No newline at end of file"
|
|
6863cbf9
|
2022-03-21T19:59:03
|
|
fix pack progress object counter for loose objects
Move pack progres object accounting to a single place. This makes
it easier to account for the case were only loose objects are packed.
A wrong amount of objects was reported before when packing loose ones.
|
|
c4e796b2
|
2022-03-21T16:08:41
|
|
in pack progress output, remove excluded objects from 'found' objects counter
|
|
cdeb891a
|
2022-03-21T15:52:15
|
|
fix a bug where 'gotadmin pack' packed too many objects unless -a was used
|
|
0ae61b79
|
2022-03-21T10:17:40
|
|
fix potential NULL deref in error path of got_object_idset_remove()
|
|
f134ecfd
|
2022-03-19T21:25:59
|
|
const-ify string table
|
|
78f5ac24
|
2022-03-19T15:06:37
|
|
move got_patch file status checking in worktree.c
check_file_status used got_worktree_status to check if the file was in
an allowed state, but it's wrong since the callback is not invoked on
unchanged files.
While here also fix a relate bug: unlink(newpath) is in the wrong spot
and ends up removing files even when it shouldn't, so move it early in
the got_worktree_schedule_* error handling.
Finally, update the appropriate test case. It was passing before
because got_worktree_schedule_add returned GOT_ERR_FILE_STATUS, not
because check_file_status failed.
ok stsp@
|
|
bfc73a47
|
2022-03-19T14:53:07
|
|
explicitly include <unistd.h> for close(2)
|
|
70cc9832
|
2022-03-19T14:19:19
|
|
move got_errors[] table into a single compilation unit (error.c)
ok stsp
|
|
d58ddaf3
|
2022-03-17T20:02:40
|
|
const-ify tables
ok thomas_adam millert
|
|
46ebad13
|
2022-03-17T16:38:43
|
|
style
|
|
60aa1fa0
|
2022-03-17T16:38:43
|
|
augment patch progress callback with hunks info; recover from errors
Augment got_patch_progress_cb by providing the hunks that were applied
with offset (or that failed) and the recoverable error encountered
during the operation (bad status, missing file, ...)
got_patch now proceeds when a file fails to be patched and exits with
GOT_ERR_PATCH_FAILED if no other errors are encountered.
While here, also add a test for the 'hunk applied with offset' case and
shrink test_patch_dont_apply and illegal_status by taking advantage that
'got patch' doesn't stop at the first error. (And add some other cases
to illegal_status too.)
discussed with and ok stsp@
|
|
95d68340
|
2022-03-16T18:23:03
|
|
got patch: create missing directories when adding files
ok stsp@
|
|
2be5e1a2
|
2022-03-16T18:23:03
|
|
got patch: keep permissions after patching a file
ok stsp@
|
|
b22138f5
|
2022-03-16T15:41:10
|
|
introduce got_patch_progress_cb
This introduce a proper got_patch specific progress callback that is
invoked after processing a patch. It also drops the hackish printf in
the modified case and takes `nop' out of the struct got_patch.
ok stsp
|
|
b8af7c06
|
2022-03-15T10:45:02
|
|
print additional progress information while packing
ok op@
|
|
c560c1f5
|
2022-03-14T13:50:31
|
|
don't `goto done' if calloc fails
otherwise we call got_repo_close with repo being NULL and segfault
there.
ok stsp
|
|
9b576444
|
2022-03-14T13:22:20
|
|
cache a list of known pack index files when the repository is opened
Avoids overhead due to readdir calls while searching a pack index.
ok op@
|
|
899fcfdf
|
2022-03-13T20:31:44
|
|
add a dry-run/nop mode for got patch
with lots of help from stsp for the manpage bits!
|
|
5b67f96e
|
2022-03-13T15:36:59
|
|
got patch: require exact match when removing files
|
|
dbda770b
|
2022-03-13T15:36:56
|
|
check file status before applying the patch
Don't allow `got patch' to delete files that are not known, or add files
that are already known and to edit files that are known, not obstructed
and without conflicts.
|
|
a84c0d30
|
2022-03-12T21:30:23
|
|
fix 'got status' with an obstructed file given as argument; found by Omar
|
|
6e96b326
|
2022-03-12T16:02:51
|
|
refactor apply_patch to support renaming files
add two helper functions (schedule_add, schedule_del) and move the guts
of apply_patch into a new function `patch_file'. This simplifies
apply_patch and makes easier to figure out what happens.
Then, drop GOT_ERR_PATCH_PATHS_DIFFER since we allow the to rename
files.
|
|
b95c53df
|
2022-03-12T16:01:09
|
|
apply_patch: move sanity check early in recv_patch
|
|
33df9995
|
2022-03-11T17:25:33
|
|
save `pos' in locate_hunk instead of calling ftello again
ok thomas, stsp
|
|
0e6ab4b2
|
2022-03-10T09:23:19
|
|
make got_repo_match_object_id_prefix() reject overlong input strings
suggested by + ok naddy
|
|
0ed2285b
|
2022-03-09T08:55:42
|
|
handle reference arguments which look like short object IDs
Match command line arguments against references before matching object IDs.
This makes it possible to use reference names that happen to match a short
object ID.
For example, a branch called "11ac" could not be diffed in OpenBSD src.git
which happens to contain commit IDs that begin with hex digits 0x11ac.
A bogus error would be reported in this situation:
$ got diff master 11ac
got: ambiguous object ID
ok naddy
|
|
d955343d
|
2022-03-08T16:01:03
|
|
pass the callback data instead of hardcoding NULL, ok stsp
|
|
36751b1b
|
2022-03-08T15:11:37
|
|
remove needless header inclusion; lib/pack.c does not need got_opentemp.h
|
|
6f5cb1bd
|
2022-03-08T12:22:36
|
|
fix path to the temp file used to accumulate the patch edits
ok stsp
|
|
e9ce266e
|
2022-03-07T22:26:08
|
|
add `got patch' command for applying unified diffs
|
|
805253d5
|
2022-03-07T20:19:35
|
|
fix level of indirection
ok stsp
|
|
3a12860c
|
2022-03-07T19:25:46
|
|
make the URI parser tolerate trailing slashes at the end of the input URI
ok naddy
|
|
e3f86256
|
2022-02-18T20:23:32
|
|
explicitly include <endian.h> for be32toh()
|
|
8934ea8b
|
2022-02-14T13:14:36
|
|
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@
|
|
688fe08b
|
2022-02-14T13:14:36
|
|
fix fd leak in got_fetch_pack, ok stsp@
|
|
28526235
|
2022-02-13T00:12:04
|
|
fix pack.sh test failure from reuse-deltas patch by tweaking progress output
|
|
67fd6849
|
2022-02-13T00:10:25
|
|
reuse existing deltas when creating pack files
tested by thomas, naddy, and myself
|
|
f6027426
|
2022-02-12T21:48:46
|
|
consistently match size of hash variables to that returned by murmurhash
ok millert stsp
|
|
2b474c25
|
2022-02-11T22:45:00
|
|
use murmurhash instead of sha1 for deltification blocks; suggested by ori
|
|
1ac8bad9
|
2022-02-11T22:44:35
|
|
reduce minimum deltification chunk size to 32; suggested by ori
|
|
916237f3
|
2022-02-11T22:42:50
|
|
fix 'got diff' on files which match an ignore pattern; found by Omar Polo
|
|
d75b4088
|
2022-02-08T10:52:17
|
|
set zlib output buffer length properly after resizing the output buffer
ok millert naddy
|
|
a9bd296d
|
2022-02-08T10:48:04
|
|
fix infinite loop in got-index-pack for pack files >= 4GB in size
Because of a missing range check our zlib wrapper would end up
calling zlib over and over with zero bytes of input.
Problem reported by semarie and naddy.
Fixed with help from millert@.
ok millert naddy
|
|
9b4603c0
|
2022-01-31T16:27:14
|
|
improve 'got add' error message if file does not exist; reported by Timo Myyrä
ok tracey
|
|
c7b17232
|
2022-01-28T18:07:47
|
|
fix loose object file header parser for zero-length headers
ok millert tracey
|
|
a47330a2
|
2022-01-27T22:32:09
|
|
fix 'got status' reporting all directories on NFS mounts as unversioned
Problem found and fix tested by Ted Bullock.
ok millert, naddy
|
|
8264d9ee
|
2022-01-27T12:05:24
|
|
fix wrong imsg name in errors raised by got_privsep_send_tree_req()
|
|
9296b03b
|
2022-01-26T10:33:52
|
|
remove unnecessary local variable from got_privsep_get_imsg_obj()
|
|
d1b988e3
|
2022-01-26T10:33:52
|
|
add missing initialization of delta list in got_privsep_get_imsg_obj()
|
|
0ee7a4dc
|
2022-01-26T10:33:21
|
|
fix double-free and double-close issues in error paths of got_packidx_open()
|
|
692bdcc4
|
2022-01-25T22:48:26
|
|
make 'got rm' report an "unexpected status" error for unversioned files
ok millert@
|
|
4e12cd97
|
2022-01-25T22:48:26
|
|
make 'got rm' behave like rm(1) for paths found missing on disk
ok millert@
|
|
969ea98d
|
2022-01-24T08:04:11
|
|
remove non-reachable 'return NULL' statement from report_single_file_status()
|
|
72840534
|
2022-01-19T12:04:58
|
|
compress delta data from delta_cache directly into pack file
|
|
30ee8dc8
|
2022-01-18T20:51:19
|
|
add missing error check in got_inflate_to_mem_mmap()
|
|
3bfc2334
|
2022-01-11T15:37:06
|
|
fix file corruption regression in 'got checkout' caused by commit db696021
got-read-pack must rewind its files temporary files before reusing them.
Problem reported by naddy
ok tracey naddy
|
|
3976db15
|
2022-01-10T14:46:30
|
|
add missing checks for reads beyond the mapped memory area of a pack file
|
|
402a5ec1
|
2022-01-10T13:13:16
|
|
set a cap on the amount of memory we use to store encoded deltas
|
|
5060d5a1
|
2022-01-10T11:09:25
|
|
encode short deltas in memory instead of writing them to a temporary file
|
|
64a8571e
|
2022-01-07T23:32:27
|
|
map raw object files into memory while packing if possible
|
|
59b21794
|
2022-01-07T14:33:52
|
|
only open raw objects if necessary while writing out pack file data
significantly speeds up the "writing pack: " step of gotadmin pack
|
|
0f71f619
|
2022-01-06T22:30:35
|
|
fix wrong path in a comment
|
|
2471f5c4
|
2022-01-06T19:20:52
|
|
sync files from diff.git b72f51ffc39028023059fc994542565691b669fa
This fixes a scrolling problem in tog's diff view for diffs which
contain lines of the form "Binary files %s and %s differ".
|
|
dbe266a4
|
2022-01-05T20:24:13
|
|
print status output even if 'gotadmin cleanup' finds no objects to remove
|
|
9cd5f067
|
2022-01-05T20:14:59
|
|
fix amount of purged objects shown in gotadmin cleanup's final progress report
|
|
211cfef0
|
2022-01-05T19:57:10
|
|
use time-based rate-limiting for gotadmin progress output
Suggested by naddy some time ago.
ok tracey
|
|
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%.
|
|
404bde06
|
2022-01-03T21:51:02
|
|
fix bogus "object not found" errors when object ID begins with 00
ok thomas_adam
|
|
c0df5966
|
2021-12-31T09:33:01
|
|
wrap overlong lines
|
|
e7ae0baf
|
2021-12-31T09:11:22
|
|
add O_CLOEXEC (close-on-exec) to openat(2) calls
suggested by millert
ok thomas_adam
|
|
8bd0cdad
|
2021-12-31T09:11:21
|
|
add O_CLOEXEC (close-on-exec) flag to open(2) calls
suggested by millert
ok thomas_adam
|
|
00fe21f2
|
2021-12-31T09:11:21
|
|
add "e" (close-on-exec) flag to fopen(3) calls
suggested by millert
ok thomas_adam
|
|
ed7cc4a8
|
2021-12-29T12:03:33
|
|
remove outdated comment
|
|
197088a4
|
2021-12-27T05:20:04
|
|
whitespace
|
|
46ea77db
|
2021-12-20T16:18:41
|
|
sort paths in got log -Pp and tog's diff view the same way as in the diff
reported by and fix confirmed by naddy
|
|
4a55b231
|
2021-12-09T16:10:25
|
|
ignore the return value of closefrom(2); patch by Anna a.k.a. CyberTailor
millert@ suggests that this check is not needed, and that ideally we
should be using close-on-exec instead. I will look into this, but in the
meantime this change will help -portable: https://bugs.gentoo.org/828003
|
|
f6f4c787
|
2021-11-23T19:12:49
|
|
sync files from diff.git f1dbec24f9a9553e22659f6c592c91e96221f6b9
|
|
42864987
|
2021-11-20T11:14:44
|
|
fall back to comparison by name when refs have the same timestamp
This fixes an issue where some references were missing from lists of
references sorted by timestamp.
|
|
2d497592
|
2021-11-20T10:40:33
|
|
implement got_reflist_sort() which sorts a ref list in-place
|
|
0309152a
|
2021-11-20T10:39:04
|
|
fix uninitialized error from got_ref_cmp_by_commit_timestamp_descending()
|
|
7f66531d
|
2021-11-16T14:33:26
|
|
allow sorting references by timestamp in tog
|
|
0e039681
|
2021-11-15T17:00:36
|
|
preverse binary files during updates and merges
|
|
7d69d862
|
2021-11-15T15:18:40
|
|
let gotadmin find the repository automatically if invoked in a work tree
Move a small amount of code from worktree.c to a new file worktree_open.c,
which contains everything required to open and close a work tree and inspect
some of its basic parameters. This can be used by gotadmin.
ok tracey
|
|
47a90748
|
2021-10-27T15:23:59
|
|
remove unused variables to fix LLVM 13 warnings; ok stsp
|
|
22edbce7
|
2021-10-24T09:41:04
|
|
use up to 128 delta chain elements again; creates smaller packs at same speed
|
|
4f4d853e
|
2021-10-24T09:41:04
|
|
try only 3 delta base candidates instead of 10 to speed up packing
Tests by kn, thomas_adam and myself made on various repositories
indicate that 3 is a good choice. Tyring 10 deltas is much slower
and does not result in significantly smaller pack files.
|
|
15a5c949
|
2021-10-17T14:12:46
|
|
set oldo.to in diff3.c's duplicate() even if the file contains no newlines
|
|
8383a50b
|
2021-10-17T14:11:32
|
|
always initialize output parameter "n" of get_line() in diff3.c
|
|
4f18c400
|
2021-10-16T15:01:42
|
|
fix another segfault in edscript()
Same problem as fixed in 90de04bc7f1b85b9c491bcd124f6178fad005de1.
ok stsp
|
|
92410079
|
2021-10-16T14:50:03
|
|
fix regression where 'got send -T' failed if same tag already exists on server
Problem reported and fix tested by Omar Polo.
|
|
a319ca8c
|
2021-10-15T10:36:12
|
|
move encode_delta() in pack_create.c to eliminate a forward declaration
|
|
74881701
|
2021-10-15T10:34:44
|
|
while packing, store encoded deltas in a temporary file instead of in memory
|
|
dc20764a
|
2021-10-15T09:30:29
|
|
limit delta chain length in newly created pack files to 32 deltas
Our former limit was 128 which is fairly high. Git uses 50 by default.
A smaller limit results in slightly larger pack files but makes both
packing and unpacking faster.
|
|
94dac27c
|
2021-10-15T09:24:56
|
|
raw object blocksize and read buffer were unused; remove them
|
|
284e7663
|
2021-10-15T09:21:46
|
|
remove unused internal raw object API functions
|
|
d3c116bf
|
2021-10-15T09:10:14
|
|
cache raw objects in order to speed up gotadmin pack
|
|
cc7a354a
|
2021-10-15T07:15:00
|
|
reuse temporary files which were not used by got_object_raw_open()
|
|
e65c7410
|
2021-10-14T20:50:01
|
|
add missing error checks in got_object_raw_open()
|