1. 26 Jun, 2015 2 commits
  2. 23 Jun, 2015 1 commit
  3. 22 Jun, 2015 1 commit
    • diff: check files with the same or newer timestamps · ff475375
      When a file on the workdir has the same or a newer timestamp than the
      index, we need to perform a full check of the contents, as the update of
      the file may have happened just after we wrote the index.
      
      The iterator changes are such that we can reach inside the workdir
      iterator from the diff, though it may be better to have an accessor
      instead of moving these structs into the header.
      Carlos Martín Nieto committed
  4. 16 Jun, 2015 1 commit
  5. 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
  6. 02 Jun, 2015 1 commit
  7. 28 May, 2015 1 commit
  8. 27 May, 2014 1 commit
  9. 16 May, 2014 1 commit
  10. 02 May, 2014 7 commits
  11. 25 Mar, 2014 1 commit
    • Update behavior for untracked sub-repos · d3bc95fd
      When a directory containing a .git directory (or even just a plain
      gitlink) was found, libgit2 was going out of its way to treat it
      specially.  This seemed like it was necessary because the diff
      code was not originally emulating Git's behavior for untracked
      directories correctly (i.e. scanning for ignored vs untracked items
      inside).  Now that libgit2 diff mimics Git's untracked directory
      behavior, the special handling for contained Git repos is actually
      incorrect and this commit rips it out.
      Russell Belfer committed
  12. 22 Jan, 2014 1 commit
    • Drop git_patch_to_str · c05cd792
      It's hard or even impossible to correctly free the string buffer
      allocated by git_patch_to_str in some circumstances. Drop the function
      so people have to use git_patch_to_buf instead - git_buf has a dedicated
      destructor.
      Nicolas Hake committed
  13. 14 Nov, 2013 1 commit
  14. 05 Nov, 2013 1 commit
  15. 02 Nov, 2013 1 commit
  16. 01 Nov, 2013 3 commits
    • Fix --assume-unchanged support · 3e57069e
      This was never really working right because we were checking the
      wrong flag and not checking it in all the places that we need to
      be checking it.  I finally got around to writing a test and adding
      actual support for it.
      Russell Belfer committed
    • More tests and fixed for merging reversed diffs · e7c85120
      There were a lot more cases to deal with to make sure that our
      merged (i.e. workdir-to-tree-to-index) diffs were matching the
      output of core Git.
      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
  17. 21 Oct, 2013 2 commits
    • Implement patience and minimal diff flags · 5de4ec81
      It seems that to implement these options, we just have to pass
      the appropriate flags through to the libxdiff code taken from
      core git.  So let's do it (and add a test).
      Russell Belfer committed
    • Create git_diff_line and extend git_diff_hunk · 3b5f7954
      Instead of having functions with so very many parameters to pass
      hunk and line data, this takes the existing git_diff_hunk struct
      and extends it with more hunk data, plus adds a git_diff_line.
      Those structs are used to pass back hunk and line data instead of
      the old APIs that took tons of parameters.
      
      Some work that was previously only being done for git_diff_patch
      creation (scanning the diff content for exact line counts) is now
      done for all callbacks, but the performance difference should not
      be noticable.
      Russell Belfer committed
  18. 15 Oct, 2013 1 commit
    • Diff API cleanup · 10672e3e
      This lays groundwork for separating formatting options from diff
      creation options.  This groups the formatting flags separately
      from the diff list creation flags and reorders the options.  This
      also tweaks some APIs to further separate code that uses patches
      from code that just looks at git_diffs.
      Russell Belfer committed
  19. 11 Oct, 2013 1 commit
  20. 08 Oct, 2013 1 commit
    • More filemode cleanups for FAT on MacOS · 14997dc5
      This cleans up some additional issues.  The main change is that
      on a filesystem that doesn't support mode bits, libgit2 will now
      create new blobs with GIT_FILEMODE_BLOB always instead of being
      at the mercy to the filesystem driver to report executable or not.
      This means that if "core.filemode" lies and claims that filemode
      is not supported, then we will ignore the executable bit from the
      filesystem.  Previously we would have allowed it.
      
      This adds an option to the new git_repository_reset_filesystem to
      recurse through submodules if desired.  There may be other types
      of APIs that would like a "recurse submodules" option, but this
      one is particularly useful.
      
      This also has a number of cleanups, etc., for related things
      including trying to give better error messages when problems come
      up from the filesystem.  For example, the FAT filesystem driver on
      MacOS appears to return errno EINVAL if you attempt to write a
      filename with invalid UTF-8 in it.  We try to capture that with a
      better error message now.
      Russell Belfer committed
  21. 24 Sep, 2013 1 commit
  22. 10 Jul, 2013 1 commit
    • Untracked directories with .git should be ignored · 125655fe
      This restores a behavior that was accidentally lost during some
      diff refactoring where an untracked directory that contains a .git
      item should be treated as IGNORED, not as UNTRACKED.  The submodule
      code already detects this, but the diff code was not handling the
      scenario right.
      
      This also updates a number of existing tests that were actually
      exercising the behavior but did not have the right expectations in
      place.  It actually makes the new
      `test_diff_submodules__diff_ignore_options` test feel much better
      because the "not-a-submodule" entries are now ignored instead of
      showing up as untracked items.
      
      Fixes #1697
      Russell Belfer committed
  23. 20 Jun, 2013 1 commit
  24. 15 May, 2013 1 commit
  25. 30 Apr, 2013 1 commit
  26. 22 Apr, 2013 1 commit
  27. 11 Apr, 2013 1 commit
  28. 26 Mar, 2013 1 commit
    • Fix some diff ignores and submodule dirty workdir · ccfa6805
      This started out trying to look at the problems from issue #1425
      and gradually grew to a broader set of fixes.  There are two core
      things fixed here:
      
      1. When you had an ignore like "/bin" which is rooted at the top
         of your tree, instead of immediately adding the "bin/" entry
         as an ignored item in the diff, we were returning all of the
         direct descendants of the directory as ignored items.  This
         changes things to immediately ignore the directory.  Note that
         this effects the behavior in test_status_ignore__subdirectories
         so that we no longer exactly match core gits ignore behavior,
         but the new behavior probably makes more sense (i.e. we now
         will include an ignored directory inside an untracked directory
         that we previously would have left off).
      2. When a submodule only contained working directory changes, the
         diff code was always considering it unmodified which was just
         an outright bug. The HEAD SHA of the submodule matches the SHA
         in the parent repo index, and since the SHAs matches, the diff
         code was overwriting the actual status with UNMODIFIED.
      
      These fixes broke existing tests test_diff_workdir__submodules and
      test_status_ignore__subdirectories but looking it over, I actually
      think the new results are correct and the old results were wrong.
      @nulltoken had actually commented on the subdirectory ignore issue
      previously.
      
      I also included in the tests some debugging versions of the
      shared iteration callback routines that print status or diff
      information.  These aren't used actively in the tests, but can be
      quickly swapped in to test code to give a better picture of what
      is being scanned in some of the complex test scenarios.
      Russell Belfer committed
  29. 25 Mar, 2013 2 commits