lib/pack.c


Log

Author Commit Date CI Message
Stefan Sperling 106807b4 2018-09-15T20:57:10 make object caching actually work in got-read-pack
Stefan Sperling faaa1c0f 2018-09-15T20:05:47 handle errors from read(2) better while reading pack files
Stefan Sperling 3840f4c9 2018-09-13T00:06:12 fix "rpath" pledge violation in got-read-pack
Stefan Sperling c59b3346 2018-09-11T12:29:46 stop sending deltas in imsg; cache deltas in got-read-pack
Stefan Sperling 876c234b 2018-09-10T12:30:47 start reading pack files with privsep; still WIP
Stefan Sperling 40cf7208 2018-09-09T17:26:34 remove unused includes from pack.c
Stefan Sperling 7e212e3d 2018-09-09T17:24:46 make got_packfile_extract_object_to_mem() accept pack instead of repo
Stefan Sperling 24140570 2018-09-09T17:19:27 make got_packfile_extract_object() accept a pack instead of a repo
Stefan Sperling 2090a03d 2018-09-09T17:00:33 make got_packfile_open_object() accept a pack instead of a repo
Stefan Sperling 1510f469 2018-09-09T16:33:32 move pack caching code from pack.c to repository.c
Stefan Sperling 35c73765 2018-09-09T16:14:11 make open_packed_object() expect a pack instead of a repo
Stefan Sperling a98c62b1 2018-09-09T16:09:01 remove unused parameter of open_delta_object()
Stefan Sperling 2ce68b2f 2018-09-09T16:07:11 don't redundantly open pack file in dump_delta_chain_to_file()
Stefan Sperling 48095039 2018-09-09T16:03:39 don't open pack redundantly in dump_delta_chain_to_mem()
Stefan Sperling c8ecd499 2018-09-09T16:00:41 remove unused parameter from functions resolving packfile deltas
Stefan Sperling 4fb0d740 2018-09-09T15:57:26 remove unused parameter of open_packfile()
Stefan Sperling 4a9c75d9 2018-09-09T15:56:38 remove unused parameter of get_packfile_path()
Stefan Sperling 3413160a 2018-09-09T15:55:40 remove unused parameter of get_object_idx()
Stefan Sperling 817c5a18 2018-09-09T15:50:02 move packidx header initialization to a separate function
Stefan Sperling c336f889 2018-07-23T10:53:49 don't store copies of packfile paths in each delta
Stefan Sperling 673702af 2018-07-23T10:37:54 fix leak in dump_delta_chain_to_file()
Stefan Sperling ab3ad429 2018-07-23T10:34:33 fix leaks in resolve_offset_delta()
Stefan Sperling 3efa19e7 2018-07-13T10:51:34 fix more memleaks
Stefan Sperling e8f89a81 2018-07-13T10:38:31 only unmap map if non-NULL in got_pack_close()
Stefan Sperling 45202a8f 2018-07-11T20:57:44 fix reading ref deltas
Stefan Sperling 63581804 2018-07-09T22:23:00 rename zbuf to inflate
Stefan Sperling fc79a48d 2018-07-09T17:00:51 add a compile time switch to read pack index with read(2)
Stefan Sperling af9b7fee 2018-07-09T16:32:39 add compile-time switch which disables mmap for pack files
Stefan Sperling 57363308 2018-07-09T16:20:48 fall back to read() as intended if mapping packfile fails
Stefan Sperling d7464085 2018-07-09T15:30:16 read pack files with mmap
Stefan Sperling 0cb74cf4 2018-07-08T19:08:12 don't verify pack index SHA1 upon regular access
Stefan Sperling b0e2201a 2018-06-22T21:15:24 simplify more code which assumed deltas could span mulitple packs
Stefan Sperling 49847196 2018-06-22T20:56:40 wrap overlong lines
Stefan Sperling 652b2703 2018-06-22T20:43:22 only search one pack file while resolving deltas
Stefan Sperling 57b35b75 2018-06-22T20:12:26 access pack index files with mmap()
Stefan Sperling 49c99f91 2018-06-22T20:09:05 don't needlessly copy packidx when caching it
Stefan Sperling 40aeb19c 2018-06-22T13:03:45 use binary search to find objects in pack index
Stefan Sperling 56cca8e5 2018-06-04T20:54:13 use macro instead of literal ".pack"
Stefan Sperling 72fb0363 2018-06-04T20:53:30 use macro instead of literal ".idx"
Stefan Sperling d475dd0d 2018-06-04T20:52:43 use strlcpy instead of strncpy
Stefan Sperling 4738e5f4 2018-06-04T20:46:09 remove unnecessary forward declaration
Stefan Sperling c8262310 2018-06-04T18:11:39 use local variable to save screen estate in got_packidx_open()
Stefan Sperling 0b48ab23 2018-06-04T18:06:47 wrap overlong lines
Stefan Sperling 6fd11751 2018-06-04T18:02:06 turns out on-disk path of pack file may not match its hash Fixes reading a repo with a pack idx and file dated June 2011, where the filename does not contain the actual packfile SHA1.
Stefan Sperling f5feadcc 2018-06-04T16:22:01 fix bogus free() in error path of cache_pack()
Stefan Sperling 511a516b 2018-05-19T16:57:12 move got_opentmp* functions to public API; used from tog
Stefan Sperling 0c048b15 2018-04-27T11:25:46 offsets in pack files should not make us seek beyond EOF
Stefan Sperling 8b2180d4 2018-04-26T19:47:10 store fd instead of FILE in struct got_pack to prepare privsep
Stefan Sperling 2178c42e 2018-04-22T14:51:49 read object headers with privsep
Stefan Sperling 5b7e13a7 2018-04-02T12:46:33 put a limit on delta chain recursion
Stefan Sperling dfb54902 2018-04-02T11:45:31 wrap long lines
Stefan Sperling 97128b57 2018-04-02T10:09:22 in get_packfile_size(), get errno from stat() and init output early
Stefan Sperling 1c7e24f1 2018-04-02T10:05:35 avoid unnecessary string copies and allocations in get_packfile_size()
Stefan Sperling 4810de4a 2018-04-01T23:16:35 we have implemented all object types, switch to better error code
Stefan Sperling 16dcbf91 2018-04-01T15:59:36 remove debug code accidentally committed
Stefan Sperling 72eb3431 2018-04-01T15:57:43 look up deltas in the correct pack file
Stefan Sperling 040bf4a1 2018-04-01T14:43:53 stop using fmemopen(); that code path didn't work correctly
Stefan Sperling 0a585a0d 2018-03-17T18:13:19 remove GOT_ERR_NO_MEM, we can just use errno in those cases
Stefan Sperling 718b3ab0 2018-03-17T17:50:48 rename the library-internal headers again to a common prefix
Stefan Sperling 4589e373 2018-03-17T15:41:39 remove mmap() stuff; checkout is fast enough for now
Stefan Sperling 0bd0053c 2018-03-17T15:31:18 handle empty files in got_packfile_extract_object()
Stefan Sperling d0f3be7c 2018-03-17T15:17:14 initialize some output variables on failure
Stefan Sperling 6bb255dc 2018-03-17T15:12:44 don't dup_packidx() during cache lookup; fixes performance :)
Stefan Sperling 40426839 2018-03-17T15:05:06 remove unused argument from get_delta_chain_max_size()
Stefan Sperling c52ac529 2018-03-17T15:01:36 extract objects smaller than DELTA_RESULT_SIZE_CACHED_MAX to memory
Stefan Sperling a53d2f13 2018-03-17T14:19:13 cache delta data in struct got_delta directly
Stefan Sperling 6d89869a 2018-03-17T03:35:04 use cached packfile in open_packed_object()
Stefan Sperling 999f19f6 2018-03-17T02:36:20 use cached packfile in resolve_ref_delta()
Stefan Sperling e1ad6ebc 2018-03-17T02:12:34 remove path_packfile from struct got_delta_cache; add a counter instead
Stefan Sperling f7e127f3 2018-03-17T02:02:32 move delta cache into struct got_pack
Stefan Sperling 7e656b93 2018-03-17T01:37:48 add struct got_pack; some preparation for mmap, which isn't used yet
Stefan Sperling b29656e2 2018-03-16T23:05:12 set obj->size of packed deltified objects to object's actual size
Stefan Sperling 65cf1e80 2018-03-16T22:33:22 revert the pack file handle cache again; needs more thought
Stefan Sperling ef2bccd9 2018-03-16T22:14:51 stop opening pack files redundantly to read deltas
Stefan Sperling 6845d284 2018-03-16T21:40:20 use SEEK_SET instead of SEEK_CUR after opening packfile
Stefan Sperling 87c99799 2018-03-16T21:26:06 start caching file handles to packfiles
Stefan Sperling ea35256b 2018-03-16T19:27:48 avoid a round-trip via tempfile when reading packed commits
Stefan Sperling 40dc5ff8 2018-03-16T19:22:22 rename a function for clarity
Stefan Sperling e0ab43e7 2018-03-16T19:20:15 avoid a round-trip of data through a temp file when reading trees
Stefan Sperling 8628c62d 2018-03-15T01:21:57 process small deltas in memory; unfortunately it is not faster...
Stefan Sperling 1cc8e7f9 2018-03-15T00:31:05 remove a useless and leaky allocation
Stefan Sperling 9db65d41 2018-03-14T23:42:16 In dump_delta_chain(), don't open the packfile if it's not needed.
Stefan Sperling ec889268 2018-03-14T23:32:19 fix open file handle leak in dump_delta_chain()
Stefan Sperling 9feb4ff2 2018-03-14T02:37:58 propagate error from delta cache insertion; fixes mem leak
Stefan Sperling bd1223b9 2018-03-14T01:21:09 add a delta cache; saves us from reading + decompressing some deltas
Stefan Sperling 22484865 2018-03-13T18:28:40 process delta chains in memory if max size is < 32 MB
Stefan Sperling 25783624 2018-03-12T13:59:29 use stricter CPPFLAGS from mpi
Stefan Sperling 32cb896c 2018-03-11T14:10:56 rename library-private headers from *_priv.h to *_lib.h
Stefan Sperling 5677e194 2018-03-11T13:20:25 rename got_zb_priv.h to got_zbuf_priv.h
Stefan Sperling 63afc6c6 2018-03-10T01:09:31 unwrap short line
Stefan Sperling 0a71ee67 2018-03-09T18:12:10 return error from search_packidx() if dup_packidx() fails
Stefan Sperling 79b11c62 2018-03-09T17:01:49 add a pack index cache; speeds tree listing up quite a lot
Stefan Sperling 39e73dc9 2018-03-03T14:18:08 We don't use a delta combiner, we use delta application. A "delta combiner" (as used in SVN) combines deltas and applies the combined delta to the base. We don't do this yet; we apply deltas one by one.
Stefan Sperling 1411938b 2018-02-12T23:25:38 rename private header filenames so they are in got_ namespace
Stefan Sperling 908b0194 2018-02-12T21:29:08 move struct got_zstream_buf to private header zb.h
Stefan Sperling bdd2fbb3 2018-02-12T00:01:26 read delta data from the right offset
Stefan Sperling 0e22967e 2018-02-11T22:43:21 we must store delta's type-and-size length separately to skip it
Stefan Sperling a6b158cc 2018-02-11T19:15:55 don't read plain objects to memory during unpack
Stefan Sperling 044e7393 2018-02-11T18:35:45 don't assume objects IDs are sorted by their values in packidx
Stefan Sperling 61d262a8 2018-02-11T16:37:53 make got_inflate_read() properly indicate if it needs to be called again