1. 14 Jul, 2022 1 commit
  2. 20 Jun, 2022 1 commit
  3. 23 Feb, 2022 1 commit
  4. 09 Nov, 2021 1 commit
  5. 05 Jun, 2020 1 commit
  6. 20 Jul, 2019 1 commit
  7. 31 Mar, 2016 1 commit
  8. 03 Mar, 2015 2 commits
  9. 07 Nov, 2014 1 commit
  10. 08 Apr, 2014 1 commit
    • Update submodules with parent-tracked content · eb7e17cc
      This updates how libgit2 treats submodule-like directories that
      actually have tracked content inside of them.  This is a strange
      corner case, but it seems that many people have abortive submodule
      setups and then just went ahead and added the files into the
      parent repository.  In this case, we should just treat the
      submodule as if it was a normal directory.
      
      Libgit2 will still try to skip over real submodules and contained
      repositories that do not have tracked files inside them, but this
      adds some new handling for cases where the apparently submodule
      data is in conflict with the actual list of tracked files.
      Russell Belfer committed
  11. 02 Apr, 2014 1 commit
  12. 25 Mar, 2014 1 commit
    • 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
  13. 30 Jan, 2014 1 commit
  14. 20 Jan, 2014 1 commit
  15. 14 Nov, 2013 1 commit
  16. 17 Sep, 2013 1 commit
  17. 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
  18. 15 May, 2013 1 commit
  19. 09 Apr, 2013 1 commit
    • Tests and more fixes for submodule diffs · ad26434b
      This adds tests for diffs with submodules in them and (perhaps
      unsurprisingly) requires further fixes to be made.  Specifically,
      this fixes:
      
      - when considering if a submodule is dirty in the workdir, it was
        being treated as dirty even if only the index was dirty.
      - git_diff_patch_to_str (and git_diff_patch_print) were "printing"
        the headers for files (and submodules) that were unmodified or
        had no meaningful content.
      - added comment to previous fix and removed unneeded parens.
      Russell Belfer committed
  20. 29 Mar, 2013 1 commit
  21. 26 Mar, 2013 2 commits
    • 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
    • Implement GIT_STATUS_OPT_EXCLUDE_SUBMODULES · 37ee70fa
      This option has been sitting unimplemented for a while, so I
      finally went through and implemented it along with some tests.
      
      As part of this, I improved the implementation of
      GIT_DIFF_IGNORE_SUBMODULES so it be more diligent about avoiding
      extra work and about leaving off delta records for submodules to
      the greatest extent possible (though it may include them still
      if you are request TYPECHANGE records).
      Russell Belfer committed
  22. 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
  23. 17 May, 2012 2 commits
  24. 15 May, 2012 1 commit
    • Ranged iterators and rewritten git_status_file · 41a82592
      The goal of this work is to rewrite git_status_file to use the
      same underlying code as git_status_foreach.
      
      This is done in 3 phases:
      
      1. Extend iterators to allow ranged iteration with start and
         end prefixes for the range of file names to be covered.
      2. Improve diff so that when there is a pathspec and there is
         a common non-wildcard prefix of the pathspec, it will use
         ranged iterators to minimize excess iteration.
      3. Rewrite git_status_file to call git_status_foreach_ext
         with a pathspec that covers just the one file being checked.
      
      Since ranged iterators underlie the status & diff implementation,
      this is actually fairly efficient.  The workdir iterator does
      end up loading the contents of all the directories down to the
      single file, which should ideally be avoided, but it is pretty
      good.
      Russell Belfer committed
  25. 10 May, 2012 1 commit
    • Add cache busting to attribute cache · dc13f1f7
      This makes the git attributes and git ignores cache check
      stat information before using the file contents from the
      cache.  For cached files from the index, it checks the SHA
      of the file instead.  This should reduce the need to ever
      call `git_attr_cache_flush()` in most situations.
      
      This commit also fixes the `git_status_should_ignore` API
      to use the libgit2 standard parameter ordering.
      Russell Belfer committed
  26. 04 Apr, 2012 1 commit
  27. 28 Mar, 2012 1 commit
    • Added submodule API and use in status · bfc9ca59
      When processing status for a newly checked out repo, it is
      possible that there will be submodules that have not yet been
      initialized.  The only way to distinguish these from untracked
      directories is to have some knowledge of submodules.  This
      commit adds a new submodule API which, given a name or path,
      can determine if it appears to be a submodule and can give
      information about the submodule.
      Russell Belfer committed
  28. 26 Mar, 2012 1 commit
  29. 22 Mar, 2012 1 commit
    • More status testing · a56aacf4
      This "fixes" the broken t18 status tests to accurately reflect
      the new behavior for "created" untracked subdirectories.  See
      discussion in the PR for more details.
      
      This also contains the submodules unit test that I forgot to
      git add, and ports most of the t18-status.c tests to clar (still
      missing a couple of the git_status_file() single file tests).
      Russell Belfer committed