1. 17 Sep, 2015 1 commit
    • git_futils_mkdir_*: make a relative-to-base mkdir · ac2fba0e
      Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter
      assumes that we own everything beneath the base, as if it were
      being called with a base of the repository or working directory,
      and is tailored towards checkout and ensuring that there is no
      bogosity beneath the base that must be cleaned up.
      
      This is (at best) slow and (at worst) unsafe in the larger context
      of a filesystem where we do not own things and cannot do things like
      unlink symlinks that are in our way.
      Edward Thomson committed
  2. 28 Aug, 2015 1 commit
  3. 22 Jun, 2015 2 commits
  4. 07 Nov, 2014 1 commit
    • iterator: submodules are determined by an index or tree · 62a617dc
      We cannot know from looking at .gitmodules whether a directory is a
      submodule or not. We need the index or tree we are comparing against to
      tell us. Otherwise we have to assume the entry in .gitmodules is stale
      or otherwise invalid.
      
      Thus we pass the index of the repository into the workdir iterator, even
      if we do not want to compare against it. This follows what git does,
      which even for `git diff <tree>`, it will consider staged submodules as
      such.
      Carlos Martín Nieto committed
  5. 25 Mar, 2014 2 commits
    • 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
    • Make submodules externally refcounted · a15c7802
      `git_submodule` objects were already refcounted internally in case
      the submodule name was different from the path at which it was
      stored.  This makes that refcounting externally used as well, so
      `git_submodule_lookup` and `git_submodule_add_setup` return an
      object that requires a `git_submodule_free` when done.
      Russell Belfer committed
  6. 14 Nov, 2013 1 commit
  7. 08 Oct, 2013 1 commit
    • Case sensitivity issues on Linux · d5e83627
      A couple of tests were actually dealing incorrectly with case
      sensitivity issues on Linux because they were relying on having
      core.ignorecase set to true.  Now that the fixture initialization
      sets the case sensitivity to be accurate for the platform, it
      exposed bugs in these tests.
      Russell Belfer committed
  8. 17 Sep, 2013 1 commit
  9. 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
  10. 17 Jun, 2013 1 commit
  11. 31 May, 2013 1 commit
    • Make iterators use GIT_ITEROVER & smart advance · cee695ae
      1. internal iterators now return GIT_ITEROVER when you go past the
         last item in the iteration.
      2. git_iterator_advance will "advance" to the first item in the
         iteration if it is called immediately after creating the
         iterator, which allows a simpler idiom for basic iteration.
      3. if git_iterator_advance encounters an error reading data (e.g.
         a missing tree or an unreadable file), it returns the error
         but also attempts to advance past the invalid data to prevent
         an infinite loop.
      
      Updated all tests and internal usage of iterators to account for
      these new behaviors.
      Russell Belfer committed
  12. 03 May, 2013 1 commit
  13. 30 Apr, 2013 1 commit
    • Update diff handling of untracked directories · e26b14c0
      When diff encounters an untracked directory, there was a shortcut
      that it took which is not compatible with core git.  This makes
      the default behavior no longer take that shortcut and instead look
      inside the untracked directory to see if there are any untracked
      files within it.  If there are not, then the directory is treated
      as an ignore directory instead of an untracked directory.  This
      has implications for the git_status APIs.
      Russell Belfer committed
  14. 19 Mar, 2013 1 commit
    • Three submodule status bug fixes · 65025cb8
      1. Fix sort order problem with submodules where "mod" was sorting
         after "mod-plus" because they were being sorted as "mod/" and
         "mod-plus/".  This involved pushing the "contains a .git entry"
         test significantly lower in the stack.
      2. Reinstate behavior that a directory which contains a .git entry
         will be treated as a submodule during iteration even if it is
         not yet added to the .gitmodules.
      3. Now that any directory containing .git is reported as submodule,
         we have to be more careful checking for GIT_EEXISTS when we
         do a submodule lookup, because that is the error code that is
         returned by git_submodule_lookup when you try to look up a
         directory containing .git that has no record in gitmodules or
         the index.
      Russell Belfer committed
  15. 27 Jan, 2013 1 commit
  16. 09 Nov, 2012 1 commit
    • Extensions to rmdir and mkdir utilities · 331e7de9
      * Rework GIT_DIRREMOVAL values to GIT_RMDIR flags, allowing
        combinations of flags
      * Add GIT_RMDIR_EMPTY_PARENTS flag to remove parent dirs that
        are left empty after removal
      * Add GIT_MKDIR_VERIFY_DIR to give an error if item is a file,
        not a dir (previously an EEXISTS error was ignored, even for
        files) and enable this flag for git_futils_mkpath2file call
      * Improve accuracy of error messages from git_futils_mkdir
      Russell Belfer committed
  17. 30 Oct, 2012 1 commit
  18. 09 Oct, 2012 1 commit
    • Add complex checkout test and then fix checkout · 0d64bef9
      This started as a complex new test for checkout going through the
      "typechanges" test repository, but that revealed numerous issues
      with checkout, including:
      
      * complete failure with submodules
      * failure to create blobs with exec bits
      * problems when replacing a tree with a blob because the tree
        "example/" sorts after the blob "example" so the delete was
        being processed after the single file blob was created
      
      This fixes most of those problems and includes a number of other
      minor changes that made it easier to do that, including improving
      the TYPECHANGE support in diff/status, etc.
      Russell Belfer committed
  19. 24 Aug, 2012 2 commits
    • Working implementation of git_submodule_status · 5f4a61ae
      This is a big redesign of the git_submodule_status API and the
      implementation of the redesigned API.  It also fixes a number of
      bugs that I found in other parts of the submodule API while
      writing the tests for the status part.
      
      This also fixes a couple of bugs in the iterators that had not
      been noticed before - one with iterating when there is a gitlink
      (i.e. separate-work-dir) and one where I was treating anything
      even vaguely submodule-like as a submodule, more aggressively
      than core git does.
      Russell Belfer committed
    • Major submodule rewrite · aa13bf05
      This replaces the old submodule API with a new extended API that
      supports most of the things that can be done with `git submodule`.
      Russell Belfer committed