1. 28 Feb, 2016 1 commit
  2. 12 Feb, 2016 1 commit
  3. 03 Nov, 2015 1 commit
    • diff: test "symlinks" in wd are respected on win32 · f20480ab
      When `core.symlinks = false`, we write the symlinks content (target)
      to a regular file.  We should ensure that when we later see that
      regular file, we treat it specially - and that changing that regular
      file would actually change the symlink target.  (For compatibility
      with Git for Windows).
      Edward Thomson committed
  4. 21 Oct, 2015 1 commit
  5. 12 Sep, 2015 1 commit
  6. 31 Aug, 2015 1 commit
    • iterator: saner pathlist matching for idx iterator · d53c8880
      Some nicer refactoring for index iteration walks.
      
      The index iterator doesn't binary search through the pathlist space,
      since it lacks directory entries, and would have to binary search
      each index entry and all its parents (eg, when presented with an index
      entry of `foo/bar/file.c`, you would have to look in the pathlist for
      `foo/bar/file.c`, `foo/bar` and `foo`).  Since the index entries and the
      pathlist are both nicely sorted, we walk the index entries in lockstep
      with the pathlist like we do for other iteration/diff/merge walks.
      Edward Thomson committed
  7. 30 Aug, 2015 1 commit
    • diff: use new iterator pathlist handling · 4a0dbeb0
      When using literal pathspecs in diff with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`
      turn on the faster iterator pathlist handling.
      
      Updates iterator pathspecs to include directory prefixes (eg, `foo/`)
      for compatibility with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`.
      Edward Thomson committed
  8. 29 Aug, 2015 1 commit
  9. 26 Jun, 2015 2 commits
  10. 23 Jun, 2015 1 commit
  11. 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
  12. 16 Jun, 2015 1 commit
  13. 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
  14. 02 Jun, 2015 1 commit
  15. 28 May, 2015 1 commit
  16. 27 May, 2014 1 commit
  17. 16 May, 2014 1 commit
  18. 02 May, 2014 7 commits
  19. 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
  20. 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
  21. 14 Nov, 2013 1 commit
  22. 05 Nov, 2013 1 commit
  23. 02 Nov, 2013 1 commit
  24. 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
  25. 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
  26. 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
  27. 11 Oct, 2013 1 commit
  28. 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
  29. 24 Sep, 2013 1 commit
  30. 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