1. 09 Oct, 2012 1 commit
    • Add complex checkout test and then fix checkout · 0d64bef9
      This started as a complex new test for checkout going through the
      "typechanges" test repository, but that revealed numerous issues
      with checkout, including:
      
      * complete failure with submodules
      * failure to create blobs with exec bits
      * problems when replacing a tree with a blob because the tree
        "example/" sorts after the blob "example" so the delete was
        being processed after the single file blob was created
      
      This fixes most of those problems and includes a number of other
      minor changes that made it easier to do that, including improving
      the TYPECHANGE support in diff/status, etc.
      Russell Belfer committed
  2. 21 Aug, 2012 2 commits
  3. 19 Aug, 2012 1 commit
  4. 13 Aug, 2012 2 commits
  5. 04 Aug, 2012 1 commit
  6. 26 Jul, 2012 1 commit
    • Fix git_tree_walk to return user error · 2031760c
      This makes sure that an error code returned by the callback function
      of `git_tree_walk` will stop the iteration and get propagated back
      to the caller verbatim.
      
      Also, this adds a minor helper function `git_tree_entry_byoid` that
      searches a `git_tree` for an entry with the given OID.  This isn't
      a fast function, but it's easier than writing the loop yourself as
      an external user of the library.
      Russell Belfer committed
  7. 24 Jul, 2012 1 commit
  8. 19 Jul, 2012 1 commit
  9. 12 Jul, 2012 2 commits
  10. 29 Jun, 2012 2 commits
  11. 08 Jun, 2012 1 commit
  12. 07 Jun, 2012 1 commit
  13. 17 May, 2012 2 commits
  14. 16 May, 2012 2 commits
  15. 15 May, 2012 1 commit
    • Ranged iterators and rewritten git_status_file · 41a82592
      The goal of this work is to rewrite git_status_file to use the
      same underlying code as git_status_foreach.
      
      This is done in 3 phases:
      
      1. Extend iterators to allow ranged iteration with start and
         end prefixes for the range of file names to be covered.
      2. Improve diff so that when there is a pathspec and there is
         a common non-wildcard prefix of the pathspec, it will use
         ranged iterators to minimize excess iteration.
      3. Rewrite git_status_file to call git_status_foreach_ext
         with a pathspec that covers just the one file being checked.
      
      Since ranged iterators underlie the status & diff implementation,
      this is actually fairly efficient.  The workdir iterator does
      end up loading the contents of all the directories down to the
      single file, which should ideally be avoided, but it is pretty
      good.
      Russell Belfer committed
  16. 03 May, 2012 1 commit
  17. 30 Apr, 2012 1 commit
  18. 26 Apr, 2012 1 commit
  19. 17 Apr, 2012 1 commit
  20. 28 Mar, 2012 1 commit
  21. 06 Mar, 2012 1 commit
    • error-handling: Repository · cb8a7961
      This also includes droping `git_buf_lasterror` because it makes no sense
      in the new system. Note that in most of the places were it has been
      dropped, the code needs cleanup. I.e. GIT_ENOMEM is going away, so
      instead it should return a generic `-1` and obviously not throw
      anything.
      Vicent Martí committed
  22. 23 Feb, 2012 1 commit
  23. 13 Feb, 2012 1 commit
  24. 05 Feb, 2012 1 commit
  25. 19 Jan, 2012 1 commit
  26. 17 Jan, 2012 1 commit
    • Move path related functions from fileops to path · 1744fafe
      This takes all of the functions that look up simple data about
      paths (such as `git_futils_isdir`) and moves them over to path.h
      (becoming `git_path_isdir`).  This leaves fileops.h just with
      functions that actually manipulate the filesystem or look at
      the file contents in some way.
      
      As part of this, the dir.h header which is really just for win32
      support was moved into win32 (with some minor changes).
      Russell Belfer committed
  27. 30 Dec, 2011 2 commits
  28. 14 Dec, 2011 1 commit
  29. 08 Dec, 2011 1 commit
    • Use git_buf for path storage instead of stack-based buffers · 97769280
      This converts virtually all of the places that allocate GIT_PATH_MAX
      buffers on the stack for manipulating paths to use git_buf objects
      instead.  The patch is pretty careful not to touch the public API
      for libgit2, so there are a few places that still use GIT_PATH_MAX.
      
      This extends and changes some details of the git_buf implementation
      to add a couple of extra functions and to make error handling easier.
      
      This includes serious alterations to all the path.c functions, and
      several of the fileops.c ones, too.  Also, there are a number of new
      functions that parallel existing ones except that use a git_buf
      instead of a stack-based buffer (such as git_config_find_global_r
      that exists alongsize git_config_find_global).
      
      This also modifies the win32 version of p_realpath to allocate whatever
      buffer size is needed to accommodate the realpath instead of hardcoding
      a GIT_PATH_MAX limit, but that change needs to be tested still.
      Russell Belfer committed
  30. 03 Dec, 2011 2 commits
    • tree: recursive diff-index · e9238687
      Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
      Signed-off-by: Vicent Marti <tanoku@gmail.com>
      
      # Please enter the commit message for your changes. Lines starting
      # with '#' will be ignored, and an empty message aborts the commit.
      #
      # Author:    Carlos Martín Nieto <carlos@cmartin.tk>
      #
      # On branch development
      # Your branch is ahead of 'origin/development' by 11 commits.
      #
      # Changes to be committed:
      #   (use "git reset HEAD^1 <file>..." to unstage)
      #
      #	modified:   include/git2/tree.h
      #	modified:   src/tree.c
      #	modified:   tests-clay/clay_main.c
      #	modified:   tests-clay/object/tree/diff.c
      #
      # Untracked files:
      #   (use "git add <file>..." to include in what will be committed)
      #
      #	0001-remote-Cleanup-the-remotes-code.patch
      #	466.patch
      #	466.patch.1
      #	488.patch
      #	Makefile
      #	libgit2.0.15.0.dylib
      #	libgit2.0.dylib
      #	libgit2.dylib
      #	libgit2_clay
      #	libgit2_test
      #	tests-clay/object/tree/
      Vicent Marti committed
    • tree: implement tree diffing · a1fdea28
      For each difference in the trees, the callback gets called with the
      relevant information so the user can fill in their own data
      structures.
      
      Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
      Carlos Martín Nieto committed
  31. 26 Nov, 2011 2 commits
    • Rename all `_close` methods · 45e79e37
      There's no difference between `_free` and `_close` semantics: keep
      everything with the same name to avoid confusions.
      Vicent Marti committed
    • 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