1. 26 Mar, 2013 1 commit
    • Implement GIT_STATUS_OPT_EXCLUDE_SUBMODULES · 37ee70fa
      This option has been sitting unimplemented for a while, so I
      finally went through and implemented it along with some tests.
      
      As part of this, I improved the implementation of
      GIT_DIFF_IGNORE_SUBMODULES so it be more diligent about avoiding
      extra work and about leaving off delta records for submodules to
      the greatest extent possible (though it may include them still
      if you are request TYPECHANGE records).
      Russell Belfer committed
  2. 25 Mar, 2013 1 commit
    • Recursing into ignored dirs for diff and status · 0c289dd7
      This implements working versions of GIT_DIFF_RECURSE_IGNORED_DIRS
      and GIT_STATUS_OPT_RECURSE_IGNORED_DIRS along with some tests for
      the newly available behaviors.  This is not turned on by default
      for status, but can be accessed via the options to the extended
      version of the command.
      Russell Belfer committed
  3. 15 Jan, 2013 2 commits
    • Support case insensitive tree iterators and status · 25423d03
      This makes tree iterators directly support case insensitivity by
      using a secondary index that can be sorted by icase.  Also, this
      fixes the ambiguity check in the git_status_file API to also be
      case insensitive.  Lastly, this adds new test cases for case
      insensitive range boundary checking for all types of iterators.
      
      With this change, it should be possible to deprecate the spool
      and sort iterator, but I haven't done that yet.
      Russell Belfer committed
    • Fix err msg for ambiguous path in git_status_file · 5c8bb98c
      Returning GIT_EAMBIGUOUS from inside the status callback gets
      overridden with GIT_EUSER.  `git_status_file` accounted for this
      via the callback payload, but was allowing the error message to
      be cleared.  Move the `giterr_set` call outside the callback to
      where the EUSER case was being dealt with.
      Russell Belfer committed
  4. 08 Jan, 2013 1 commit
  5. 17 Dec, 2012 1 commit
    • Fix diff constructor name order confusion · 56c72b75
      The diff constructor functions had some confusing names, where the
      "old" side of the diff was coming after the "new" side.  This
      reverses the order in the function name to make it less confusing.
      
      Specifically...
      
      * git_diff_index_to_tree becomes git_diff_tree_to_index
      * git_diff_workdir_to_index becomes git_diff_index_to_workdir
      * git_diff_workdir_to_tree becomes git_diff_tree_to_workdir
      Russell Belfer committed
  6. 01 Dec, 2012 1 commit
  7. 30 Nov, 2012 2 commits
  8. 27 Nov, 2012 2 commits
  9. 22 Nov, 2012 1 commit
  10. 15 Nov, 2012 2 commits
  11. 09 Nov, 2012 1 commit
    • Some diff refactorings to help code reuse · 55cbd05b
      There are some diff functions that are useful in a rewritten
      checkout and this lays some groundwork for that.  This contains
      three main things:
      
      1. Share the function diff uses to calculate the OID for a file
         in the working directory (now named `git_diff__oid_for_file`
      2. Add a `git_diff__paired_foreach` function to iterator over
         two diff lists concurrently.  Convert status to use it.
      3. Move all the string/prefix/index entry comparisons into
         function pointers inside the `git_diff_list` object so they
         can be switched between case sensitive and insensitive
         versions.  This makes them easier to reuse in various
         functions without replicating logic.  As part of this, move
         a couple of index functions out of diff.c and into index.c.
      Russell Belfer committed
  12. 01 Nov, 2012 1 commit
  13. 15 Oct, 2012 1 commit
    • Fix single-file ignore checks · 52032ae5
      To answer if a single given file should be ignored, the path to
      that file has to be processed progressively checking that there
      are no intermediate ignored directories in getting to the file
      in question.  This enables that, fixing the broken old behavior,
      and adds tests to exercise various ignore situations.
      Russell Belfer committed
  14. 09 Oct, 2012 2 commits
    • 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
    • Introduce status/diff TYPECHANGE flags · bc16fd3e
      When I wrote the diff code, I based it on core git's diff output
      which tends to split a type change into an add and a delete.  But
      core git's status has the notion of a T (typechange) flag for a
      file.  This introduces that into our status APIs and modifies the
      diff code so it can be forced to not split type changes.
      Russell Belfer committed
  15. 17 Sep, 2012 1 commit
  16. 05 Sep, 2012 1 commit
    • Diff iterators · f335ecd6
      This refactors the diff output code so that an iterator object
      can be used to traverse and generate the diffs, instead of just
      the `foreach()` style with callbacks.  The code has been rearranged
      so that the two styles can still share most functions.
      
      This also replaces `GIT_REVWALKOVER` with `GIT_ITEROVER` and uses
      that as a common error code for marking the end of iteration when
      using a iterator style of object.
      Russell Belfer committed
  17. 22 Aug, 2012 1 commit
  18. 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
  19. 24 Jul, 2012 3 commits
  20. 17 May, 2012 2 commits
  21. 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
  22. 10 May, 2012 1 commit
    • Add cache busting to attribute cache · dc13f1f7
      This makes the git attributes and git ignores cache check
      stat information before using the file contents from the
      cache.  For cached files from the index, it checks the SHA
      of the file instead.  This should reduce the need to ever
      call `git_attr_cache_flush()` in most situations.
      
      This commit also fixes the `git_status_should_ignore` API
      to use the libgit2 standard parameter ordering.
      Russell Belfer committed
  23. 08 May, 2012 2 commits
  24. 03 May, 2012 1 commit
    • Support reading attributes from index · f917481e
      Depending on the operation, we need to consider gitattributes
      in both the work dir and the index.  This adds a parameter to
      all of the gitattributes related functions that allows user
      control of attribute reading behavior (i.e. prefer workdir,
      prefer index, only use index).
      
      This fix also covers allowing us to check attributes (and
      hence do diff and status) on bare repositories.
      
      This was a somewhat larger change that I hoped because it had
      to change the cache key used for gitattributes files.
      Russell Belfer committed
  25. 02 May, 2012 1 commit
  26. 23 Apr, 2012 1 commit
  27. 17 Apr, 2012 2 commits
    • Add git_reference_lookup_oid and lookup_resolved · f201d613
      Adds a new public reference function `git_reference_lookup_oid`
      that directly resolved a reference name to an OID without returning
      the intermediate `git_reference` object (hence, no free needed).
      
      Internally, this adds a `git_reference_lookup_resolved` function
      that combines looking up and resolving a reference.  This allows
      us to be more efficient with memory reallocation.
      
      The existing `git_reference_lookup` and `git_reference_resolve`
      are reimplmented on top of the new utility and a few places in the
      code are changed to use one of the two new functions.
      Russell Belfer committed
    • Remove old status implementation · dbeca796
      This removes the code for the old status implementation.
      Russell Belfer committed
  28. 13 Apr, 2012 1 commit
  29. 11 Apr, 2012 1 commit
  30. 04 Apr, 2012 1 commit