1. 03 Aug, 2015 4 commits
  2. 28 Jul, 2015 1 commit
  3. 13 Aug, 2014 1 commit
  4. 25 Feb, 2014 1 commit
  5. 11 Dec, 2013 1 commit
    • 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
  6. 05 Nov, 2013 1 commit
  7. 04 Nov, 2013 1 commit
    • Add giterr_detach API to get and clear error · d6c60169
      There are a number of cases where it is convenient to be able to
      fetch and "claim" the current error string, clearing the error.
      This is helpful when you need to call some code that may alter
      the error and you want to restore it later on and/or report it via
      some other mechanism.
      Russell Belfer committed
  8. 08 Oct, 2013 1 commit
    • More filemode cleanups for FAT on MacOS · 14997dc5
      This cleans up some additional issues.  The main change is that
      on a filesystem that doesn't support mode bits, libgit2 will now
      create new blobs with GIT_FILEMODE_BLOB always instead of being
      at the mercy to the filesystem driver to report executable or not.
      This means that if "core.filemode" lies and claims that filemode
      is not supported, then we will ignore the executable bit from the
      filesystem.  Previously we would have allowed it.
      
      This adds an option to the new git_repository_reset_filesystem to
      recurse through submodules if desired.  There may be other types
      of APIs that would like a "recurse submodules" option, but this
      one is particularly useful.
      
      This also has a number of cleanups, etc., for related things
      including trying to give better error messages when problems come
      up from the filesystem.  For example, the FAT filesystem driver on
      MacOS appears to return errno EINVAL if you attempt to write a
      filename with invalid UTF-8 in it.  We try to capture that with a
      better error message now.
      Russell Belfer committed
  9. 14 Mar, 2013 1 commit
    • Fix valgrind issues (and mmap fallback for diff) · d85296ab
      This fixes a number of issues identified by valgrind - mostly
      missed free calls.  Inside valgrind, mmap() may fail which causes
      some of the diff tests to fail.  This adds a fallback code path
      to diff_output.c:get_workdir_content() where is the mmap() fails
      the code will now try to read the file data directly into allocated
      memory (which is what it would do if the data needed to be filtered
      anyhow).
      Russell Belfer committed
  10. 22 Feb, 2013 1 commit
  11. 01 Feb, 2013 4 commits
  12. 08 Jan, 2013 1 commit
  13. 01 Dec, 2012 1 commit
  14. 02 Nov, 2012 2 commits
  15. 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
  16. 24 Aug, 2012 1 commit
  17. 03 May, 2012 2 commits
  18. 25 Apr, 2012 1 commit
    • Implement git_pool paged memory allocator · 2bc8fa02
      This adds a `git_pool` object that can do simple paged memory
      allocation with free for the entire pool at once.  Using this,
      you can replace many small allocations with large blocks that
      can then cheaply be doled out in small pieces.  This is best
      used when you plan to free the small blocks all at once - for
      example, if they represent the parsed state from a file or data
      stream that are either all kept or all discarded.
      
      There are two real patterns of usage for `git_pools`: either
      for "string" allocation, where the item size is a single byte
      and you end up just packing the allocations in together, or for
      "fixed size" allocation where you are allocating a large object
      (e.g. a `git_oid`) and you generally just allocation single
      objects that can be tightly packed.  Of course, you can use it
      for other things, but those two cases are the easiest.
      Russell Belfer committed
  19. 11 Apr, 2012 1 commit
    • Refactor git_repository_open with new options · 7784bcbb
      Add a new command `git_repository_open_ext` with extended options
      that control how searching for a repository will be done.  The
      existing `git_repository_open` and `git_repository_discover` are
      reimplemented on top of it.  We may want to change the default
      behavior of `git_repository_open` but this commit does not do that.
      
      Improve support for "gitdir" files where the work dir is separate
      from the repo and support for the "separate-git-dir" config.  Also,
      add support for opening repos created with `git-new-workdir` script
      (although I have only confirmed that they can be opened, not that
      all functions work correctly).
      
      There are also a few minor changes that came up:
      
      - Fix `git_path_prettify` to allow in-place prettifying.
      
      - Fix `git_path_root` to support backslashes on Win32.  This fix
        should help many repo open/discover scenarios - it is the one
        function called when opening before prettifying the path.
      
      - Tweak `git_config_get_string` to set the "out" pointer to NULL
        if the config value is not found.  Allows some other cleanup.
      
      - Fix a couple places that should have been calling
        `git_repository_config__weakptr` and were not.
      
      - Fix `cl_git_sandbox_init` clar helper to support bare repos.
      Russell Belfer committed
  20. 13 Mar, 2012 2 commits
    • Resolve comments from pull request · e3c47510
      This converts the map validation function into a macro, tweaks
      the GITERR_OS system error automatic appending, and adds a
      tentative new error access API and some quick unit tests for
      both the old and new error APIs.
      Russell Belfer committed
    • 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
  21. 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
  22. 07 Mar, 2012 2 commits
  23. 05 Mar, 2012 1 commit
  24. 03 Mar, 2012 1 commit
  25. 13 Feb, 2012 1 commit
  26. 16 Nov, 2011 1 commit
  27. 29 Oct, 2011 1 commit
  28. 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
  29. 18 Sep, 2011 1 commit
    • Cleanup legal data · bb742ede
      1. The license header is technically not valid if it doesn't have a
      copyright signature.
      
      2. The COPYING file has been updated with the different licenses used in
      the project.
      
      3. The full GPLv2 header in each file annoys me.
      Vicent Marti committed
  30. 24 Aug, 2011 1 commit