1. 10 Sep, 2012 1 commit
    • Replace git_diff_iterator_num_files with progress · b36effa2
      The `git_diff_iterator_num_files` API was problematic, since we
      don't actually know the exact number of files to be iterated over
      until we load those files into memory.  This replaces it with a
      new `git_diff_iterator_progress` API that goes from 0 to 1, and
      moves and renamed the old API for the internal places that can
      tolerate a max value instead of an exact value.
      Russell Belfer committed
  2. 06 Sep, 2012 1 commit
    • Implement filters for status/diff blobs · 60b9d3fc
      This adds support to diff and status for running filters (a la crlf)
      on blobs in the workdir before computing SHAs and before generating
      text diffs.  This ended up being a bit more code change than I had
      thought since I had to reorganize some of the diff logic to minimize
      peak memory use when filtering blobs in a diff.
      
      This also adds a cap on the maximum size of data that will be loaded
      to diff.  I set it at 512Mb which should match core git.  Right now
      it is a #define in src/diff.h but it could be moved into the public
      API if desired.
      Russell Belfer committed
  3. 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
  4. 08 Jun, 2012 1 commit
    • Fix filemode comparison in diffs · 0abd7244
      File modes were both not being ignored properly on platforms
      where they should be ignored, nor be diffed consistently on
      platforms where they are supported.
      
      This change adds a number of diff and status filemode change
      tests.  This also makes sure that filemode-only changes are
      included in the diff output when they occur and that filemode
      changes are ignored successfully when core.filemode is false.
      
      There is no code that automatically toggles core.filemode
      based on the capabilities of the current platform, so the user
      still needs to be careful in their .git/config file.
      Russell Belfer committed
  5. 02 May, 2012 1 commit
  6. 25 Apr, 2012 2 commits
  7. 13 Apr, 2012 1 commit
  8. 30 Mar, 2012 1 commit
  9. 26 Mar, 2012 1 commit
    • Eliminate hairy COITERATE macro · 1db12b00
      I decided that the COITERATE macro was, in the end causing
      more confusion that it would save and decided just to write
      out the loops that I needed for parallel diff list iteration.
      It is not that much code and this just feels less obfuscated.
      Russell Belfer committed
  10. 21 Mar, 2012 1 commit
  11. 02 Mar, 2012 4 commits
    • Update diff to use iterators · 74fa4bfa
      This is a major reorganization of the diff code.  This changes
      the diff functions to use the iterators for traversing the
      content.  This allowed a lot of code to be simplified.  Also,
      this moved the functions relating to outputting a diff into a
      new file (diff_output.c).
      
      This includes a number of other changes - adding utility
      functions, extending iterators, etc. plus more tests for the
      diff code.  This also takes the example diff.c program much
      further in terms of emulating git-diff command line options.
      Russell Belfer committed
    • First pass of diff index to workdir implementation · e47329b6
      This is an initial version of git_diff_workdir_to_index.  It
      also includes renaming some structures and some refactoring
      of the existing code so that it could be shared better with
      the new function.
      
      This is not complete since it needs a rebase to get some
      new odb functions from the upstream branch.
      Russell Belfer committed
    • Continue implementation of git-diff · a2e895be
      * Implemented git_diff_index_to_tree
      * Reworked git_diff_options structure to handle more options
      * Made most of the options in git_diff_options actually work
      * Reorganized code a bit to remove some redundancy
      * Added option parsing to examples/diff.c to test most options
      Russell Belfer committed
    • Implement diff lists and formatters · 65b09b1d
      This reworks the diff API to separate the steps of producing
      a diff descriptions from formatting the diff.  This will allow
      us to share diff output code with the various diff creation
      scenarios and will allow us to implement rename detection as
      an optional pass that can be run on a diff list.
      Russell Belfer committed