1. 18 Jan, 2020 1 commit
  2. 22 Nov, 2019 1 commit
  3. 03 Jul, 2017 1 commit
    • Make sure to always include "common.h" first · 0c7f49dd
      Next to including several files, our "common.h" header also declares
      various macros which are then used throughout the project. As such, we
      have to make sure to always include this file first in all
      implementation files. Otherwise, we might encounter problems or even
      silent behavioural differences due to macros or defines not being
      defined as they should be. So in fact, our header and implementation
      files should make sure to always include "common.h" first.
      
      This commit does so by establishing a common include pattern. Header
      files inside of "src" will now always include "common.h" as its first
      other file, separated by a newline from all the other includes to make
      it stand out as special. There are two cases for the implementation
      files. If they do have a matching header file, they will always include
      this one first, leading to "common.h" being transitively included as
      first file. If they do not have a matching header file, they instead
      include "common.h" as first file themselves.
      
      This fixes the outlined problems and will become our standard practice
      for header and source files inside of the "src/" from now on.
      Patrick Steinhardt committed
  4. 12 Jun, 2015 1 commit
    • diff: introduce binary diff callbacks · 8147b1af
      Introduce a new binary diff callback to provide the actual binary
      delta contents to callers.  Create this data from the diff contents
      (instead of directly from the ODB) to support binary diffs including
      the workdir, not just things coming out of the ODB.
      Edward Thomson committed
  5. 27 Feb, 2014 1 commit
    • Add buffer to buffer diff and patch APIs · 6789b7a7
      This adds `git_diff_buffers` and `git_patch_from_buffers`.  This
      also includes a bunch of internal refactoring to increase the
      shared code between these functions and the blob-to-blob and
      blob-to-buffer APIs, as well as some higher level assert helpers
      in the tests to also remove redundancy.
      Russell Belfer committed
  6. 11 Oct, 2013 1 commit
  7. 18 Jun, 2013 1 commit
    • Add "as_path" parameters to blob and buffer diffs · 74ded024
      This adds parameters to the four functions that allow for blob-to-
      blob and blob-to-buffer differencing (either via callbacks or by
      making a git_diff_patch object).  These parameters let you say
      that filename we should pretend the blob has while doing the diff.
      If you pass NULL, there should be no change from the existing
      behavior, which is to skip using attributes for file type checks
      and just look at content.  With the parameters, you can plug into
      the new diff driver functionality and get binary or non-binary
      behavior, plus function context regular expressions, etc.
      
      This commit also fixes things so that the git_diff_delta that is
      generated by these functions will actually be populated with the
      data that we know about the blobs (or buffers) so you can use it
      appropriately.  It also fixes a bug in generating patches from
      the git_diff_patch objects created via these functions.
      
      Lastly, there is one other behavior change that may matter.  If
      there is no difference between the two blobs, these functions no
      longer generate any diff callbacks / patches unless you have
      passed in GIT_DIFF_INCLUDE_UNMODIFIED.  This is pretty natural,
      but could potentially change the behavior of existing usage.
      Russell Belfer committed
  8. 12 Jun, 2013 1 commit
    • Fix diff header naming issues · 360f42f4
      This makes the git_diff_patch definition private to diff_patch.c
      and fixes a number of other header file naming inconsistencies to
      use `git_` prefixes on functions and structures that are shared
      between files.
      Russell Belfer committed
  9. 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
  10. 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