1. 20 Feb, 2013 1 commit
    • Replace diff delta binary with flags · 71a3d27e
      Previously the git_diff_delta recorded if the delta was binary.
      This replaces that (with no net change in structure size) with
      a full set of flags.  The flag values that were already in use
      for individual git_diff_file objects are reused for the delta
      flags, too (along with renaming those flags to make it clear that
      they are used more generally).
      
      This (a) makes things somewhat more consistent (because I was
      using a -1 value in the "boolean" binary field to indicate unset,
      whereas now I can just use the flags that are easier to understand),
      and (b) will make it easier for me to add some additional flags to
      the delta object in the future, such as marking the results of a
      copy/rename detection or other deltas that might want a special
      indicator.
      
      While making this change, I officially moved some of the flags that
      were internal only into the private diff header.
      
      This also allowed me to remove a gross hack in rename/copy detect
      code where I was overwriting the status field with an internal
      value.
      Russell Belfer committed
  2. 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
  3. 30 Nov, 2012 1 commit
  4. 15 Nov, 2012 2 commits
  5. 25 Oct, 2012 1 commit
  6. 28 Sep, 2012 1 commit
  7. 25 Sep, 2012 3 commits
    • Add const to all shared pointers in diff API · bae957b9
      There are a lot of places where the diff API gives the user access
      to internal data structures and many of these were being exposed
      through non-const pointers.  This replaces them all with const
      pointers for any object that the user can access but is still
      owned internally to the git_diff_list or git_diff_patch objects.
      
      This will probably break some bindings...  Sorry!
      Russell Belfer committed
    • Fix bugs in new diff patch code · 64286308
      This fixes all the bugs in the new diff patch code.  The only
      really interesting one is that when we merge two diffs, we now
      have to actually exclude diff delta records that are not supposed
      to be tracked, as opposed to before where they could be included
      because they would be skipped silently by `git_diff_foreach()`.
      Other than that, there are just minor errors.
      Russell Belfer committed
    • Initial implementation of new diff patch API · 5f69a31f
      Replacing the `git_iterator` object, this creates a simple API
      for accessing the "patch" for any file pair in a diff list and
      then gives indexed access to the hunks in the patch and the lines
      in the hunk.  This is the initial implementation of this revised
      API - it is still broken, but at least builds cleanly.
      Russell Belfer committed
  8. 11 Sep, 2012 1 commit
    • Fix diff binary file detection · 1f35e89d
      In the process of adding tests for the max file size threshold
      (which treats files over a certain size as binary) there seem to
      be a number of problems in the new code with detecting binaries.
      This should fix those up, as well as add a test for the file
      size threshold stuff.
      
      Also, this un-deprecates `GIT_DIFF_LINE_ADD_EOFNL`, since I
      finally found a legitimate situation where it would be returned.
      Russell Belfer committed
  9. 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