- 22 Jun, 2018 7 commits
-
-
Now that we have implement functions to parse all git objects from raw data, we can implement a generic function `git_object__from_raw` to create a structure of type `git_object`. This allows us to parse and interpret objects from raw data without having to touch the ODB at all, which is especially useful for object verification prior to accepting them into the repository.
Patrick Steinhardt committed -
Currently, parsing objects is strictly tied to having an ODB object available. This makes it hard to parse an object when all that is available is its raw object and size. Furthermore, hacking around that limitation by directly creating an ODB structure either on stack or on heap does not really work that well due to ODB objects being reference counted and then automatically free'd when reaching a reference count of zero. Implement a function `git_tree__parse_raw` to parse a tree object from a pair of `data` and `size`.
Patrick Steinhardt committed -
Currently, parsing objects is strictly tied to having an ODB object available. This makes it hard to parse an object when all that is available is its raw object and size. Furthermore, hacking around that limitation by directly creating an ODB structure either on stack or on heap does not really work that well due to ODB objects being reference counted and then automatically free'd when reaching a reference count of zero. Implement a function `git_tag__parse_raw` to parse a tag object from a pair of `data` and `size`.
Patrick Steinhardt committed -
Currently, parsing objects is strictly tied to having an ODB object available. This makes it hard to parse an object when all that is available is its raw object and size. Furthermore, hacking around that limitation by directly creating an ODB structure either on stack or on heap does not really work that well due to ODB objects being reference counted and then automatically free'd when reaching a reference count of zero. Implement a function `git_commit__parse_raw` to parse a commit object from a pair of `data` and `size`.
Patrick Steinhardt committed -
Currently, parsing objects is strictly tied to having an ODB object available. This makes it hard to parse an object when all that is available is its raw object and size. Furthermore, hacking around that limitation by directly creating an ODB structure either on stack or on heap does not really work that well due to ODB objects being reference counted and then automatically free'd when reaching a reference count of zero. In some occasions parsing raw objects without touching the ODB is actually recuired, though. One use case is for example object verification, where we want to assure that an object is valid before inserting it into the ODB or writing it into the git repository. Asa first step towards that, introduce a distinction between raw and ODB objects for blobs. Creation of ODB objects stays the same by simply using `git_blob__parse`, but a new function `git_blob__parse_raw` has been added that creates a blob from a pair of data and size. By setting a new flag inside of the blob, we can now distinguish whether it is a raw or ODB object now and treat it accordingly in several places. Note that the blob data passed in is not being copied. Because of that, callers need to make sure to keep it alive during the blob's life time. This is being used to avoid unnecessarily increasing the memory footprint when parsing largish blobs.
Patrick Steinhardt committed -
Going forward, we will have to change how blob sizes are calculated based on whether the blob is a cahed object part of the ODB or not. In order to not have to distinguish between those two object types repeatedly when accessing the blob's data or size, encapsulate all existing direct uses of those fields by instead using `git_blob_rawcontent` and `git_blob_rawsize`.
Patrick Steinhardt committed -
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 04a36fef (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.
Patrick Steinhardt committed
-
- 18 Jun, 2018 5 commits
-
-
Fix last references to deprecated git_buf_free
Edward Thomson committed -
revwalk: avoid walking the entire history when output is unsorted
Edward Thomson committed -
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed -
Edward Thomson committed
-
Add mailmap support.
Edward Thomson committed
-
- 17 Jun, 2018 1 commit
-
-
Nika Layzell committed
-
- 16 Jun, 2018 1 commit
-
-
tree: remove unused functions
Edward Thomson committed
-
- 15 Jun, 2018 26 commits
-
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
Link `mbedTLS` libraries in when `SHA1_BACKEND` == "mbedTLS"
Patrick Steinhardt committed -
editorconfig: allow trailing whitespace in markdown
Patrick Steinhardt committed -
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Emilio Cobos Álvarez committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Nika Layzell committed
-
Emilio Cobos Álvarez committed
-
Also matches git.
Emilio Cobos Álvarez committed -
Emilio Cobos Álvarez committed
-
This matches git.
Emilio Cobos Álvarez committed -
Not that it matters much anyway but...
Emilio Cobos Álvarez committed -
Emilio Cobos Álvarez committed
-
Nika Layzell committed
-