1. 11 Jun, 2013 1 commit
    • Implement regex pattern diff driver · 5dc98298
      This implements the loading of regular expression pattern lists
      for diff drivers that search for function context in that way.
      This also changes the way that diff drivers update options and
      interface with xdiff APIs to make them a little more flexible.
      Russell Belfer committed
  2. 10 Jun, 2013 1 commit
    • Reorganize diff and add basic diff driver · 114f5a6c
      This is a significant reorganization of the diff code to break it
      into a set of more clearly distinct files and to document the new
      organization.  Hopefully this will make the diff code easier to
      understand and to extend.
      
      This adds a new `git_diff_driver` object that looks of diff driver
      information from the attributes and the config so that things like
      function content in diff headers can be provided.  The full driver
      spec is not implemented in the commit - this is focused on the
      reorganization of the code and putting the driver hooks in place.
      
      This also removes a few #includes from src/repository.h that were
      overbroad, but as a result required extra #includes in a variety
      of places since including src/repository.h no longer results in
      pulling in the whole world.
      Russell Belfer committed
  3. 07 May, 2013 3 commits
    • Fix line numbering for patches with eofnl · c2f602f8
      When a patch contained an eofnl change (i.e. the last line either
      gained or lost a newline), the oldno and newno line number values
      for the lines in the last hunk of the patch were not useful.  This
      makes them behave in a more expected manner.
      Russell Belfer committed
    • Add GIT_DIFF_LINE_CONTEXT_EOFNL · e35e2684
      This adds a new line origin constant for the special line that
      is used when both files end without a newline.
      
      In the course of writing the tests for this, I was having problems
      with modifying a file but not having diff notice because it was
      the same size and modified less than one second from the start of
      the test, so I decided to start working on nanosecond timestamp
      support.  This commit doesn't contain the nanosecond support, but
      it contains the reorganization of maybe_modified and the hooks so
      that if the nanosecond data were being read by stat() (or rather
      being copied by git_index_entry__init_from_stat), then the nsec
      would be taken into account.
      
      This new stuff could probably use some more tests, although there
      is some amount of it here.
      Russell Belfer committed
  4. 23 Apr, 2013 1 commit
    • Improve diff config options handling · b1ff7004
      This makes diff use the cvar cache for config options where
      possible, and also adds support for a number of other config
      options to diff including "diff.context", "diff.ignoreSubmodules",
      "diff.noprefix", "diff.mnemonicprefix", and "core.abbrev".
      
      To make this natural, this involved a rearrangement of the code
      that allocates the diff object vs. the code that initializes it
      based on the combination of options passed in by the user and
      read from the config.
      
      This commit includes tests for most of these new options as well.
      Russell Belfer committed
  5. 21 Apr, 2013 1 commit
  6. 03 Mar, 2013 1 commit
    • Fix a few leaks · 323bb885
      `git_diff_get_patch()` would unconditionally load the patch object and
      then simply leak it if the user hadn't requested it. Short-circuit
      loading the object if the user doesn't want it.
      
      The rest of the plugs are simply calling the free functions of objects
      allocated during the tests.
      Carlos Martín Nieto committed
  7. 01 Mar, 2013 2 commits
  8. 22 Feb, 2013 1 commit
    • Fix tests for find_similar and related · 6f9d5ce8
      This fixes both a test that I broke in diff::patch where I was
      relying on the current state of the working directory for the
      renames test data and fixes an unstable test in diff::rename
      where the environment setting for the "diff.renames" config was
      being allowed to influence the test results.
      Russell Belfer committed
  9. 05 Feb, 2013 1 commit
  10. 30 Jan, 2013 2 commits
    • Free buffer at end of test · 3bf68be4
      Russell Belfer committed
    • Add helper for diff line stats · f1e2735c
      This adds a `git_diff_patch_line_stats()` API that gets the total
      number of adds, deletes, and context lines in a patch.  This will
      make it a little easier to emulate `git diff --stat` and the like.
      
      Right now, this relies on generating the `git_diff_patch` object,
      which is a pretty heavyweight way to get stat information.  At
      some future point, it would probably be nice to be able to get
      this information without allocating the entire `git_diff_patch`,
      but that's a much larger project.
      Russell Belfer committed
  11. 11 Jan, 2013 1 commit
    • Fix diff patch line number calculation · 805c476c
      This was just wrong.  Added a test that verifying patch line
      numbers even for hunks further into a file and then fixed the
      algorithm.  I needed to add a little extra state into the patch
      so that I could track old and new file numbers independently,
      but it should be okay.
      Russell Belfer committed
  12. 27 Nov, 2012 2 commits
  13. 15 Nov, 2012 1 commit
  14. 25 Oct, 2012 1 commit
  15. 25 Sep, 2012 1 commit
    • 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
  16. 02 May, 2012 1 commit
  17. 01 May, 2012 1 commit
  18. 30 Apr, 2012 1 commit
  19. 25 Apr, 2012 1 commit