- 02 Jun, 2015 1 commit
-
-
Pierre-Olivier Latour committed
-
- 13 May, 2015 2 commits
-
-
We currently first look in the loose object dir and then in the packs for objects. When performing operations on recent history this has a higher likelihood of hitting, but when we deal with operations which look further back into the past, we start spending a large amount of time getting ENOTENT from `access`. Reversing the priorities means that long-running operations can get to their objects faster, as we can look at the index data we have in memory (or rather mapped) to figure out whether we have an object, which is faster than going out to the filesystem. The packed backend already implements an optimistic read algorithm by first looking at the packs we know about and only going out to disk to referesh if the object is not found which means that in the case where we do have the object (which will be in the majority for anything that traverses the graph) we can avoid going to to disk entirely to determine whether an object exists. Operations which look at recent history may take a slight impact, but these would be operations which look a lot less at object and thus take less time regardless.
Carlos Martín Nieto committed -
Restricting files to size_t is a silly limitation. The loose backend writes to a file directly, so there is no issue in using 63 bits for the size. We still assume that the header is going to fit in 64 bytes, which does mean quite a bit smaller files due to the run-length encoding, but it's still a much larger size than you would want Git to handle.
Carlos Martín Nieto committed
-
- 11 May, 2015 1 commit
-
-
J Wyman committed
-
- 13 Feb, 2015 3 commits
-
-
Make our overflow checking look more like gcc and clang's, so that we can substitute it out with the compiler instrinsics on platforms that support it. This means dropping the ability to pass `NULL` as an out parameter. As a result, the macros also get updated to reflect this as well.
Edward Thomson committed -
Edward Thomson committed
-
Introduce some helper macros to test integer overflow from arithmetic and set error message appropriately.
Edward Thomson committed
-
- 09 Dec, 2014 1 commit
-
-
Edward Thomson committed
-
- 21 Nov, 2014 1 commit
-
-
This is a contract that we made in the library and that we need to uphold. The contents of a blob can never be NULL because several parts of the library (including the filter and attributes code) expect `git_blob_rawcontent` to always return a valid pointer.
Vicent Marti committed
-
- 08 Nov, 2014 1 commit
-
-
git hardocodes these as objects which exist regardless of whether they are in the odb and uses them in the shell interface as a way of expressing the lack of a blob or tree for one side of e.g. a diff. In the library we use each language's natural way of declaring a lack of value which makes a workaround like this unnecessary. Since git uses it, it does however mean each shell application would need to perform this check themselves. This makes it common work across a range of applications and an issue with compatibility with git, which fits right into what the library aims to provide. Thus we introduce the hard-coded empty blob and tree in the odb frontend. These hard-coded objects are checked for before going to the backends, but after the cache check, which means the second time they're used, they will be treated as normal cached objects instead of creating new ones.
Carlos Martín Nieto committed
-
- 23 May, 2014 1 commit
-
-
We go through the different backends in order, so it's not an error if at least one of the backends has the data we want.
Carlos Martín Nieto committed
-
- 02 May, 2014 1 commit
-
-
There were a couple of "init_opts()" functions a few more cases of structure initialization that I somehow missed.
Russell Belfer committed
-
- 21 Apr, 2014 1 commit
-
-
Jacques Germishuys committed
-
- 21 Mar, 2014 1 commit
-
-
Fixes issue #2196
Linquize committed
-
- 10 Mar, 2014 1 commit
-
-
The git_odb_exists_prefix API was not dealing correctly when a later backend returned GIT_ENOTFOUND even if an earlier backend had found the object. Additionally, the unit tests were not properly exercising the API and had a couple mistakes in checking the results. Lastly, since the backends are not expected to behavior correctly unless all bytes of the short id are zero except for the prefix, this makes the ODB prefix APIs explicitly clear out the extra bytes so the user doesn't have to be as careful.
Russell Belfer committed
-
- 06 Mar, 2014 1 commit
-
-
The basic structure of each function is courtesy of arrbee.
Matthew Bowen committed
-
- 05 Mar, 2014 2 commits
-
-
Russell Belfer committed
-
If no ODB backends support writing, we should fail gracefully.
Edward Thomson committed
-
- 04 Mar, 2014 1 commit
-
-
Russell Belfer committed
-
- 13 Jan, 2014 1 commit
-
-
Signed-off-by: Brodie Rao <brodie@sf.io>
Brodie Rao committed
-
- 04 Nov, 2013 1 commit
-
-
Edward Thomson committed
-
- 22 Oct, 2013 1 commit
-
-
Vicent Marti committed
-
- 04 Oct, 2013 1 commit
-
-
When given an ODB from which to read objects, the indexer will attempt to inject the missing bases at the end of the pack and update the header and trailer to reflect the new contents.
Carlos Martín Nieto committed
-
- 19 Sep, 2013 1 commit
-
-
Linquize committed
-
- 17 Sep, 2013 3 commits
-
-
This makes the git_buf struct that was used internally into an externally available structure and eliminates the git_buffer. As part of that, some of the special cases that arose with the externally used git_buffer were blended into the git_buf, such as being careful about git_buf objects that may have a NULL ptr and allowing for bufs with a valid ptr and size but zero asize as a way of referring to externally owned data.
Russell Belfer committed -
This moves the git_filter_list into the public API so that users can create, apply, and dispose of filter lists. This allows more granular application of filters to user data outside of libgit2 internals. This also converts all the internal usage of filters to the public APIs along with a few small tweaks to make it easier to use the public git_buffer stuff alongside the internal git_buf.
Russell Belfer committed -
This creates include/sys/filter.h with a basic definition of a git_filter and then converts the internal code to use it. There are related internal objects (git_filter_list) that we will want to publish at some point, but this is a first step.
Russell Belfer committed
-
- 11 Sep, 2013 1 commit
-
-
nulltoken committed
-
- 07 Sep, 2013 1 commit
-
-
nulltoken committed
-
- 06 Sep, 2013 1 commit
-
-
Now that #1785 is merged, git_odb_stream_finalize_write() calculates the object id before invoking the odb backend. This commit gives a chance to the backend to check if it already knows this object.
nulltoken committed
-
- 04 Sep, 2013 1 commit
-
-
Previously, `git_object_read()`, `git_object_read_prefix()` and `git_object_exists()` were implementing an auto refresh logic. When the expected object couldn't be found in any backend, a call to `git_odb_refresh()` was triggered and the lookup was once again performed against all backends. This commit removes this auto-refresh logic from the odb layer and pushes it down into the pack-backend (as it's the only one currently exposing a `refresh()` endpoint).
nulltoken committed
-
- 30 Aug, 2013 1 commit
-
-
nulltoken committed
-
- 17 Aug, 2013 1 commit
-
-
If none of the backends support direct writes and we must stream the whole file, we already know what the object's id should be; so use the stream's functions directly, bypassing the frontend's hashing and overwriting of our existing id.
Carlos Martín Nieto committed
-
- 16 Aug, 2013 1 commit
-
-
The frontend is in charge of calculating the id of the objects. Thus the backends should treat it as a read-only value. The positioning in the function signature made it seem as though it was an output parameter. Make the id const and move it from the front to behind the subject (backend or stream).
Carlos Martín Nieto committed
-
- 15 Aug, 2013 2 commits
-
-
Hash the data as it's coming into the stream and tell the backend what its name is when finalizing the write. This makes it consistent with the way a plain git_odb_write() performs the write.
Carlos Martín Nieto committed -
This is in preparation for moving the hashing to the frontend, which requires us to handle the incoming data before passing it to the backend's stream.
Carlos Martín Nieto committed
-
- 12 Aug, 2013 1 commit
-
-
By the time we recognise this as an ambiguous id, the object's data has been loaded into memory. Free it when returning EABMIGUOUS.
Carlos Martín Nieto committed
-
- 15 Jul, 2013 1 commit
-
-
Rémi Duraffort committed
-
- 12 Jun, 2013 1 commit
-
-
Vicent Marti committed
-
- 07 Jun, 2013 1 commit
-
-
This adds a `git__memset` routine that will not be optimized away and updates the places where I memset() right before a free() call to use it.
Russell Belfer committed
-