- 11 Apr, 2016 1 commit
-
-
When looking up an abbreviated oid, show the actual (abbreviated) oid the caller passed instead of a full (but ambiguously truncated) oid.
Edward Thomson committed
-
- 17 Sep, 2015 1 commit
-
-
Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter assumes that we own everything beneath the base, as if it were being called with a base of the repository or working directory, and is tailored towards checkout and ensuring that there is no bogosity beneath the base that must be cleaned up. This is (at best) slow and (at worst) unsafe in the larger context of a filesystem where we do not own things and cannot do things like unlink symlinks that are in our way.
Edward Thomson committed
-
- 13 May, 2015 1 commit
-
-
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
-
- 13 Feb, 2015 2 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 -
Introduce some helper macros to test integer overflow from arithmetic and set error message appropriately.
Edward Thomson committed
-
- 05 Dec, 2014 1 commit
-
-
Will Stamper committed
-
- 16 Sep, 2014 1 commit
-
-
Ciro Santilli committed
-
- 05 May, 2014 1 commit
-
-
We assume that everything under GIT_DIR/objects/ is a directory. This is not necessarily the case if some process left a stray file in there. Check beforehand if we do have a directory and ignore the entry otherwise.
Carlos Martín Nieto committed
-
- 05 Mar, 2014 1 commit
-
-
Russell Belfer committed
-
- 04 Mar, 2014 1 commit
-
-
Russell Belfer committed
-
- 11 Dec, 2013 3 commits
-
-
Russell Belfer committed
-
This changes the behavior of callbacks so that the callback error code is not converted into GIT_EUSER and instead we propagate the return value through to the caller. Instead of using the giterr_capture and giterr_restore functions, we now rely on all functions to pass back the return value from a callback. To avoid having a return value with no error message, the user can call the public giterr_set_str or some such function to set an error message. There is a new helper 'giterr_set_callback' that functions can invoke after making a callback which ensures that some error message was set in case the callback did not set one. In places where the sign of the callback return value is meaningful (e.g. positive to skip, negative to abort), only the negative values are returned back to the caller, obviously, since the other values allow for continuing the loop. The hardest parts of this were in the checkout code where positive return values were overloaded as meaningful values for checkout. I fixed this by adding an output parameter to many of the internal checkout functions and removing the overload. This added some code, but it is probably a better implementation. There is some funkiness in the network code where user provided callbacks could be returning a positive or a negative value and we want to rely on that to cancel the loop. There are still a couple places where an user error might get turned into GIT_EUSER there, I think, though none exercised by the tests.
Russell Belfer committed -
This adds giterr_user_cancel to return GIT_EUSER and clear any error message that is sitting around. As a result of using that in places, we need to be more thorough with capturing errors that happen inside a callback when used internally. To help with that, this also adds giterr_capture and giterr_restore so that when we internally use a foreach-type function that clears errors and converts them to GIT_EUSER, it is easier to restore not just the return value, but the actual error message text.
Russell Belfer committed
-
- 05 Nov, 2013 2 commits
-
-
Edward Thomson committed
-
Edward Thomson committed
-
- 04 Nov, 2013 1 commit
-
-
Edward Thomson committed
-
- 03 Oct, 2013 1 commit
-
-
This hooks up git_path_direach and git_path_dirload so that they will take a flag indicating if directory entry names should be tested and converted from decomposed unicode to precomposed form. This code will only come into play on the Apple platform and even then, only when certain types of filesystems are used. This involved adding a flag to these functions which involved changing a lot of places in the code. This was an opportunity to do a bit of code cleanup here and there, for example, getting rid of the git_futils_cleanupdir_r function in favor of a simple flag to git_futils_rmdir_r to not remove the top level entry. That ended up adding depth tracking during rmdir_r which led to a safety check for infinite directory recursion. Yay. This hasn't actually been tested on the Mac filesystems where the issue occurs. I still need to get test environment for that.
Russell Belfer committed
-
- 10 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
-
- 18 Aug, 2013 1 commit
-
-
nulltoken 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
-
-
Carlos Martín Nieto committed
-
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
-
- 23 Jun, 2013 1 commit
-
-
This updates the calls that make the subdirectories for objects to use a base directory above which git_futils_mkdir won't walk any higher. This prevents attempts to mkdir all the way up to the root of the filesystem. Also, this moves the objects_dir into the loose backend structure and removes the separate allocation, plus does some preformatting of the objects_dir value to guarantee a trailing slash, etc.
Russell Belfer committed
-
- 21 Apr, 2013 1 commit
-
-
This moves some of the odb_backend stuff that is related to the internals of an odb_backend implementation into include/git2/sys. Some of the stuff related to streaming I left in include/git2 because it seemed like it would be reasonably needed by a normal user who wanted to stream objects into and out of the ODB. Also, I added APIs for traversing the list of backends so that some of the tests would not need to access ODB internals.
Russell Belfer committed
-
- 08 Jan, 2013 1 commit
-
-
Edward Thomson committed
-
- 21 Dec, 2012 1 commit
-
-
Update the procondition of git_odb_backend::write. It may now be assumed that the object has already been hashed.
David Michael Barr committed
-
- 30 Nov, 2012 1 commit
-
-
Ben Straub committed
-
- 27 Nov, 2012 1 commit
-
-
This makes the first OID param of the ODB callback a const pointer and also propogates that change all the way to the backends.
Russell Belfer committed
-
- 04 Aug, 2012 1 commit
-
-
This updates all the `foreach()` type functions across the library that take callbacks from the user to have a consistent behavior. The rules are: * A callback terminates the loop by returning any non-zero value * Once the callback returns non-zero, it will not be called again (i.e. the loop stops all iteration regardless of state) * If the callback returns non-zero, the parent fn returns GIT_EUSER * Although the parent returns GIT_EUSER, no error will be set in the library and `giterr_last()` will return NULL if called. This commit makes those changes across the library and adds tests for most of the iteration APIs to make sure that they follow the above rules.
Russell Belfer committed
-
- 24 Jul, 2012 1 commit
-
-
nulltoken committed
-
- 12 Jul, 2012 1 commit
-
-
Carlos Martín Nieto committed
-
- 03 Jul, 2012 1 commit
-
-
Go through each backend and list every objects that exists in them. This allows fsck-like uses.
Carlos Martín Nieto committed
-
- 17 May, 2012 2 commits
-
-
Vicent Martí committed
-
Vicent Martí committed
-
- 04 May, 2012 1 commit
-
-
There are three changes here: - correctly propogate error code from failed object lookups - make zlib inflate use our allocators - add OID to notfound error in ODB lookups
Russell Belfer committed
-
- 30 Apr, 2012 1 commit
-
-
nulltoken committed
-
- 04 Apr, 2012 1 commit
-
-
Carlos Martín Nieto committed
-
- 16 Mar, 2012 1 commit
-
-
Also cleaned up some previously converted code that still had little things to polish.
Russell Belfer committed
-
- 13 Mar, 2012 1 commit
-
-
This migrates odb.c, odb_loose.c, odb_pack.c and pack.c to the new style of error handling. Also got the unix and win32 versions of map.c. There are some minor changes to other files but no others were completely converted. This also contains an update to filebuf so that a zeroed out filebuf will not think that the fd (== 0) is actually open (and inadvertently call close() on fd 0 if cleaned up). Lastly, this was built and tested on win32 and contains a bunch of fixes for the win32 build which was pretty broken.
Russell Belfer committed
-