1. 29 Dec, 2016 1 commit
  2. 26 May, 2016 1 commit
  3. 28 May, 2015 1 commit
    • diff/status: introduce conflicts · 7c948014
      When diffing against an index, return a new `GIT_DELTA_CONFLICTED`
      delta type for items that are conflicted.  For a single file path,
      only one delta will be produced (despite the fact that there are
      multiple entries in the index).
      
      Index iterators now have the (optional) ability to return conflicts
      in the index.  Prior to this change, they would be omitted, and callers
      (like diff) would omit conflicted index entries entirely.
      Edward Thomson committed
  4. 07 Nov, 2014 1 commit
  5. 22 Jul, 2014 1 commit
  6. 04 Jun, 2014 1 commit
  7. 30 May, 2014 1 commit
  8. 20 May, 2014 2 commits
  9. 02 May, 2014 5 commits
  10. 06 Mar, 2014 1 commit
  11. 25 Jan, 2014 1 commit
  12. 12 Dec, 2013 1 commit
    • Cleanups, renames, and leak fixes · 9cfce273
      This renames git_vector_free_all to the better git_vector_free_deep
      and also contains a couple of memory leak fixes based on valgrind
      checks.  The fixes are specifically: failure to free global dir
      path variables when not compiled with threading on and failure to
      free filters from the filter registry that had not be initialized
      fully.
      Russell Belfer committed
  13. 11 Dec, 2013 6 commits
    • Some callback error check style cleanups · c7b3e1b3
      I find this easier to read...
      Russell Belfer committed
    • Remove converting user error to GIT_EUSER · 25e0b157
      This changes the behavior of callbacks so that the callback error
      code is not converted into GIT_EUSER and instead we propagate the
      return value through to the caller.  Instead of using the
      giterr_capture and giterr_restore functions, we now rely on all
      functions to pass back the return value from a callback.
      
      To avoid having a return value with no error message, the user
      can call the public giterr_set_str or some such function to set
      an error message.  There is a new helper 'giterr_set_callback'
      that functions can invoke after making a callback which ensures
      that some error message was set in case the callback did not set
      one.
      
      In places where the sign of the callback return value is
      meaningful (e.g. positive to skip, negative to abort), only the
      negative values are returned back to the caller, obviously, since
      the other values allow for continuing the loop.
      
      The hardest parts of this were in the checkout code where positive
      return values were overloaded as meaningful values for checkout.
      I fixed this by adding an output parameter to many of the internal
      checkout functions and removing the overload.  This added some
      code, but it is probably a better implementation.
      
      There is some funkiness in the network code where user provided
      callbacks could be returning a positive or a negative value and
      we want to rely on that to cancel the loop.  There are still a
      couple places where an user error might get turned into GIT_EUSER
      there, I think, though none exercised by the tests.
      Russell Belfer committed
    • Add git_vector_free_all · fcd324c6
      There are a lot of places that we call git__free on each item in
      a vector and then call git_vector_free on the vector itself.  This
      just wraps that up into one convenient helper function.
      Russell Belfer committed
    • Further EUSER and error propagation fixes · dab89f9b
      This continues auditing all the places where GIT_EUSER is being
      returned and making sure to clear any existing error using the
      new giterr_user_cancel helper.  As a result, places that relied
      on intercepting GIT_EUSER but having the old error preserved also
      needed to be cleaned up to correctly stash and then retrieve the
      actual error.
      
      Additionally, as I encountered places where error codes were not
      being propagated correctly, I tried to fix them up.  A number of
      those fixes are included in the this commit as well.
      Russell Belfer committed
    • Improve GIT_EUSER handling · 96869a4e
      This adds giterr_user_cancel to return GIT_EUSER and clear any
      error message that is sitting around.  As a result of using that
      in places, we need to be more thorough with capturing errors that
      happen inside a callback when used internally.  To help with that,
      this also adds giterr_capture and giterr_restore so that when we
      internally use a foreach-type function that clears errors and
      converts them to GIT_EUSER, it is easier to restore not just the
      return value, but the actual error message text.
      Russell Belfer committed
  14. 01 Nov, 2013 2 commits
    • Convert git_index_read to have a "force" flag · 8e5a8ef8
      This is a little more intuitive than the turned-around option that
      I originally wrote.
      Russell Belfer committed
    • Make diff and status perform soft index reload · 4bf630b6
      This changes `git_index_read` to have two modes - a hard index
      reload that always resets the index to match the on-disk data
      (which was the old behavior) and a soft index reload that uses
      the timestamp / file size information and only replaces the index
      data if the file on disk has been modified.
      
      This then updates the git_status code to do a soft reload unless
      the new GIT_STATUS_OPT_NO_REFRESH flag is passed in.
      
      This also changes the behavior of the git_diff functions that use
      the index so that when an index is not explicitly passed in (i.e.
      when the functions call git_repository_index for you), they will
      also do a soft reload for you.
      
      This intentionally breaks the file signature of git_index_read
      because there has been some confusion about the behavior previously
      and it seems like all existing uses of the API should probably be
      examined to select the desired behavior.
      Russell Belfer committed
  15. 11 Oct, 2013 1 commit
  16. 17 Sep, 2013 1 commit
    • No such thing as an orphan branch · 605da51a
      Unfortunately git-core uses the term "unborn branch" and "orphan
      branch" interchangeably. However, "orphan" is only really there for
      the checkout command, which has the `--orphan` option so it doesn't
      actually create the branch.
      
      Branches never have parents, so the distinction of a branch with no
      parents is odd to begin with. Crucially, the error messages deal with
      unborn branches, so let's use that.
      Carlos Martín Nieto committed
  17. 28 Aug, 2013 1 commit
  18. 05 Aug, 2013 1 commit
  19. 03 Jul, 2013 2 commits
  20. 20 Jun, 2013 1 commit
    • Add status flags to force output sort order · 22b6b82f
      Files in status will, be default, be sorted according to the case
      insensitivity of the filesystem that we're running on.  However,
      in some cases, this is not desirable.  Even on case insensitive
      file systems, 'git status' at the command line will generally use
      a case sensitive sort (like 'ls').  Some GUIs prefer to display a
      list of file case insensitively even on case-sensitive platforms.
      
      This adds two new flags: GIT_STATUS_OPT_SORT_CASE_SENSITIVELY
      and GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY that will override the
      default sort order of the status output and give the user control.
      This includes tests for exercising these new options and makes
      the examples/status.c program emulate core Git and always use a
      case sensitive sort.
      Russell Belfer committed
  21. 17 Jun, 2013 5 commits
    • More tests and bug fixes for status with rename · a1683f28
      This changes the behavior of the status RENAMED flags so that they
      will be combined with the MODIFIED flags if appropriate.  If a file
      is modified in the index and also renamed, then the status code
      will have both the GIT_STATUS_INDEX_MODIFIED and INDEX_RENAMED bits
      set.  If it is renamed but the OID has not changed, then just the
      GIT_STATUS_INDEX_RENAMED bit will be set.  Similarly, the flags
      GIT_STATUS_WT_MODIFIED and GIT_STATUS_WT_RENAMED can both be set
      independently of one another.
      
      This fixes a serious bug where the check for unmodified files that
      was done at data load time could end up erasing the RENAMED state
      of a file that was renamed with no changes.
      
      Lastly, this contains a bunch of new tests for status with renames,
      including tests where the only rename changes are case changes.
      The expected results of these tests have to vary by whether the
      platform uses a case sensitive filesystem or not, so the expected
      data covers those platform differences separately.
      Russell Belfer committed
    • Improve case handling in git_diff__paired_foreach · 351888cf
      This commit reinstates some changes to git_diff__paired_foreach
      that were discarded during the rebase (because the diff_output.c
      file had gone away), and also adjusts the case insensitively
      logic slightly to hopefully deal with either mismatched icase
      diffs and other case insensitivity scenarios.
      Russell Belfer committed
    • Fix broken status EXCLUDE_SUBMODULES logic · 3a68d7f0
      The exclude submodules flag was not doing the right thing, in
      that a file with no diff between the head and the index and just
      a delete in the workdir could be excluded if submodules were
      excluded.
      Russell Belfer committed
  22. 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
  23. 10 May, 2013 1 commit
    • Improve ignore handling in git_status_file · 1f9e41ee
      The git_status_file API was doing a hack to deal with files that
      are inside ignored directories.  The status scan was not reporting
      any file in this case, so git_status_file would attempt a final
      "stat()" call, and return IGNORED if the file actually existed.
      
      On case-insensitive filesystems where core.ignorecase is set
      incorrectly, this magic check can "succeed" and report a file
      as ignored when it should actually return ENOTFOUND.
      
      Now that we have the GIT_STATUS_OPT_RECURSE_IGNORED_DIRS, we can
      use that flag to make sure that git_status_file() will look into
      ignored directories and eliminate the hack completely, so we give
      the correct error.
      Russell Belfer committed
  24. 01 May, 2013 1 commit