summaryrefslogtreecommitdiff
path: root/src/pack-objects.h
Commit message (Collapse)AuthorAgeFilesLines
* str: introduce `git_str` for internal, `git_buf` is externalethomson/gitstrEdward Thomson2021-10-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | libgit2 has two distinct requirements that were previously solved by `git_buf`. We require: 1. A general purpose string class that provides a number of utility APIs for manipulating data (eg, concatenating, truncating, etc). 2. A structure that we can use to return strings to callers that they can take ownership of. By using a single class (`git_buf`) for both of these purposes, we have confused the API to the point that refactorings are difficult and reasoning about correctness is also difficult. Move the utility class `git_buf` to be called `git_str`: this represents its general purpose, as an internal string buffer class. The name also is an homage to Junio Hamano ("gitstr"). The public API remains `git_buf`, and has a much smaller footprint. It is generally only used as an "out" param with strict requirements that follow the documentation. (Exceptions exist for some legacy APIs to avoid breaking callers unnecessarily.) Utility functions exist to convert a user-specified `git_buf` to a `git_str` so that we can call internal functions, then converting it back again.
* internal: use off64_t instead of git_off_tethomson/off_tEdward Thomson2019-11-251-1/+1
| | | | Prefer `off64_t` internally.
* object_type: use new enumeration namesethomson/index_fixesEdward Thomson2018-12-011-1/+1
| | | | Use the new object_type enumeration names within the codebase.
* pack-objects: make `git_walk_object` internal to pack-objectsPatrick Steinhardt2018-06-221-6/+0
| | | | | | | | | | | The `git_walk_objects` structure is currently only being used inside of the pack-objects.c file, but being declared in its header. This has actually been the case since its inception in 04a36feff (pack-objects: fill a packbuilder from a walk, 2014-10-11) and has never really changed. Move the struct declaration into pack-objects.c to improve code encapsulation.
* consistent header guardsethomson/header_guardsEdward Thomson2018-02-011-1/+1
| | | | use consistent names for the #include / #define header guard pattern.
* Honor `core.fsyncObjectFiles`ethomson/fsyncEdward Thomson2017-03-021-0/+1
|
* packbuilder: `size_t` all the thingsEdward Thomson2016-07-241-12/+13
| | | | | | | | After 1cd65991, we were passing a pointer to an `unsigned long` to a function that now expected a pointer to a `size_t`. These types differ on 64-bit Windows, which means that we trash the stack. Use `size_t`s in the packbuilder to avoid this.
* packbuilder: report progress during deltificationcmn/pack-objects-reportCarlos Martín Nieto2015-05-131-0/+1
| | | | | | | | This is useful to send to the client while we're performing the work. The reporting function has a force parameter which makes sure that we do send out the message of 100% completed, even if this comes before the next udpate window.
* pack-objects: fill a packbuilder from a walkCarlos Martín Nieto2015-03-111-0/+10
| | | | | | | | | | | Most use-cases for the object packer communicate in terms of commits which each side has. We already have an object to specify this relationship between commits, namely git_revwalk. By knowing which commits we want to pack and which the other side already has, we can perform similar optimisations to git, by marking each tree as interesting or uninteresting only once, and not sending those trees which we know the other side has.
* Packbuilder contains its own zstreamEdward Thomson2014-01-141-0/+2
|
* Initial Implementation of progress reports during pushJameson Miller2013-09-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | This adds the basics of progress reporting during push. While progress for all aspects of a push operation are not reported with this change, it lays the foundation to add these later. Push progress reporting can be improved in the future - and consumers of the API should just get more accurate information at that point. The main areas where this is lacking are: 1) packbuilding progress: does not report progress during deltafication, as this involves coordinating progress from multiple threads. 2) network progress: reports progress as objects and bytes are going to be written to the subtransport (instead of as client gets confirmation that they have been received by the server) and leaves out some of the bytes that are transfered as part of the push protocol. Basically, this reports the pack bytes that are written to the subtransport. It does not report the bytes sent on the wire that are received by the server. This should be a good estimate of progress (and an improvement over no progress).
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Push! By schu, phkelley, and congyiwu, et alPhilip Kelley2012-11-281-1/+0
|
* Fix MSVC compilation warningsnulltoken2012-11-171-5/+5
|
* Remove git_hash_ctx_new - callers now _ctx_init()Edward Thomson2012-11-131-1/+1
|
* Reorganize transport architecture (squashed 3)Philip Kelley2012-11-011-1/+2
|
* Incremental improvements to pack-objects logicPhilip Kelley2012-10-171-3/+6
| | | | Incorporate feedback for incr. improvements to pack-objects
* fixup! gsoc-pack-objects WIPMichael Schubert2012-10-091-3/+2
| | | | Use khash instead of git.git's hashing algorithm.
* gsoc-pack-objects WIPMichael Schubert2012-10-091-0/+85