1. 27 Feb, 2015 1 commit
  2. 05 Dec, 2014 1 commit
  3. 02 May, 2014 1 commit
  4. 30 Apr, 2014 1 commit
  5. 17 Apr, 2014 1 commit
    • Index locking and entry allocation changes · 8a2834d3
      This makes the lock management on the index a little bit broader,
      having a number of routines hold the lock across looking up the
      item to be modified and actually making the modification.  Still
      not true thread safety, but more pure index modifications are now
      safe which allows the simple cases (such as starting up a diff
      while index modifications are underway) safe enough to get the
      snapshot without hitting allocation problems.
      
      As part of this, I simplified the allocation of index entries to
      use a flex array and just put the path at the end of the index
      entry.  This makes every entry self-contained and makes it a
      little easier to feel sure that pointers to strings aren't
      being accidentally copied and freed while other references are
      still being held.
      Russell Belfer committed
  6. 20 Feb, 2014 1 commit
    • Address PR comments · 72556cc6
      * Make GIT_INLINE an internal definition so it cannot be used in
        public headers
      * Fix language in CONTRIBUTING
      * Make index caps API use signed instead of unsigned values
      Russell Belfer committed
  7. 11 Dec, 2013 4 commits
    • Fix C99 __func__ for MSVC · 60058018
      Russell Belfer committed
    • 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
  8. 09 Dec, 2013 1 commit
  9. 01 Nov, 2013 1 commit
  10. 01 Apr, 2013 1 commit
  11. 15 Mar, 2013 1 commit
    • Implement global/system file search paths · 5540d947
      The goal of this work is to expose the search logic for "global",
      "system", and "xdg" files through the git_libgit2_opts() interface.
      
      Behind the scenes, I changed the logic for finding files to have a
      notion of a git_strarray that represents a search path and to store
      a separate search path for each of the three tiers of config file.
      For each tier, I implemented a function to initialize it to default
      values (generally based on environment variables), and then general
      interfaces to get it, set it, reset it, and prepend new directories
      to it.
      
      Next, I exposed these interfaces through the git_libgit2_opts
      interface, reusing the GIT_CONFIG_LEVEL_SYSTEM, etc., constants
      for the user to control which search path they were modifying.
      There are alternative designs for the opts interface / argument
      ordering, so I'm putting this phase out for discussion.
      
      Additionally, I ended up doing a little bit of clean up regarding
      attr.h and attr_file.h, adding a new attrcache.h so the other two
      files wouldn't have to be included in so many places.
      Russell Belfer committed
  12. 28 Feb, 2013 2 commits
  13. 01 Feb, 2013 1 commit
  14. 08 Jan, 2013 1 commit
  15. 05 Dec, 2012 3 commits
  16. 03 Dec, 2012 1 commit
  17. 01 Dec, 2012 3 commits
  18. 01 Nov, 2012 1 commit
  19. 21 Sep, 2012 1 commit
    • Make giterr_set_str public · 1a628100
      There has been discussion for a while about making some set of
      the `giterr_set` type functions part of the public API for code
      that is implementing new backends to libgit2.  This makes the
      `giterr_set_str()` and `giterr_set_oom()` functions public.
      Russell Belfer committed
  20. 30 Jul, 2012 1 commit
  21. 17 Jul, 2012 1 commit
  22. 15 Jun, 2012 1 commit
  23. 19 May, 2012 3 commits
  24. 09 Mar, 2012 1 commit
    • error-handling: On-disk config file backend · dda708e7
      Includes:
      
      	- Proper error reporting when encountering syntax errors in a
      	config file (file, line number, column).
      
      	- Rewritten `config_write`, now with 99% less goto-spaghetti
      
      	- Error state in `git_filebuf`: filebuf write functions no longer
      	need to be checked for error returns. If any of the writes performed
      	on a buffer fail, the last call to `git_filebuf_commit` or
      	`git_filebuf_hash` will fail accordingly and set the appropiate error
      	message. Baller!
      Vicent Martí committed
  25. 13 Feb, 2012 1 commit
  26. 27 Jan, 2012 1 commit
  27. 26 Nov, 2011 1 commit
    • repository: Change ownership semantics · 9462c471
      The ownership semantics have been changed all over the library to be
      consistent. There are no more "borrowed" or duplicated references.
      
      Main changes:
      
      	- `git_repository_open2` and `3` have been dropped.
      
      	- Added setters and getters to hotswap all the repository owned
      	objects:
      
      		`git_repository_index`
      		`git_repository_set_index`
      		`git_repository_odb`
      		`git_repository_set_odb`
      		`git_repository_config`
      		`git_repository_set_config`
      		`git_repository_workdir`
      		`git_repository_set_workdir`
      
      	Now working directories/index files/ODBs and so on can be
      	hot-swapped after creating a repository and between operations.
      
      	- All these objects now have proper ownership semantics with
      	refcounting: they all require freeing after they are no longer
      	needed (the repository always keeps its internal reference).
      
      	- Repository open and initialization has been updated to keep in
      	mind the configuration files. Bare repositories are now always
      	detected, and a default config file is created on init.
      
      	- All the tests affected by these changes have been dropped from the
      	old test suite and ported to the new one.
      Vicent Marti committed
  28. 16 Nov, 2011 1 commit
  29. 05 Oct, 2011 1 commit
  30. 19 Sep, 2011 1 commit
    • Tabify everything · 87d9869f
      There were quite a few places were spaces were being used instead of
      tabs. Try to catch them all. This should hopefully not break anything.
      Except for `git blame`. Oh well.
      Vicent Marti committed