1. 11 Apr, 2016 1 commit
  2. 17 Sep, 2015 1 commit
    • git_futils_mkdir_*: make a relative-to-base mkdir · ac2fba0e
      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
  3. 13 May, 2015 1 commit
    • odb: make the writestream's size a git_off_t · 77b339f7
      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
  4. 13 Feb, 2015 2 commits
  5. 05 Dec, 2014 1 commit
  6. 16 Sep, 2014 1 commit
  7. 05 May, 2014 1 commit
  8. 05 Mar, 2014 1 commit
  9. 04 Mar, 2014 1 commit
  10. 11 Dec, 2013 3 commits
    • Remove converting user error to GIT_EUSER · 25e0b157
      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
    • Improve GIT_EUSER handling · 96869a4e
      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
  11. 05 Nov, 2013 2 commits
  12. 04 Nov, 2013 1 commit
  13. 03 Oct, 2013 1 commit
    • Initial iconv hookup for precomposed unicode · 219d3457
      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
  14. 10 Sep, 2013 1 commit
  15. 06 Sep, 2013 1 commit
  16. 18 Aug, 2013 1 commit
  17. 16 Aug, 2013 1 commit
  18. 15 Aug, 2013 2 commits
  19. 23 Jun, 2013 1 commit
    • Constrain mkdir calls to avoid extra mkdirs · 8294e8cf
      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
  20. 21 Apr, 2013 1 commit
    • Move odb_backend implementors stuff into git2/sys · 83cc70d9
      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
  21. 08 Jan, 2013 1 commit
  22. 21 Dec, 2012 1 commit
  23. 30 Nov, 2012 1 commit
  24. 27 Nov, 2012 1 commit
  25. 04 Aug, 2012 1 commit
    • Update iterators for consistency across library · 5dca2010
      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
  26. 24 Jul, 2012 1 commit
  27. 12 Jul, 2012 1 commit
  28. 03 Jul, 2012 1 commit
  29. 17 May, 2012 2 commits
  30. 04 May, 2012 1 commit
    • Fix valgrind issues · 282283ac
      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
  31. 30 Apr, 2012 1 commit
  32. 04 Apr, 2012 1 commit
  33. 16 Mar, 2012 1 commit
  34. 13 Mar, 2012 1 commit
    • Migrate ODB files to new error handling · e1de726c
      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