1. 13 Sep, 2015 1 commit
  2. 11 Sep, 2015 1 commit
    • iterator: advance the tree iterator smartly · a1859e21
      While advancing the tree iterator, if we advance over things that
      we aren't interested in, then call `current`.  Which may *itself*
      call advance.
      
      While advancing the tree iterator, if we advance over things that
      we aren't interested in, then call `current`.  Which may *itself*
      call advance.
      
      While advancing the tree iterator, if we advance over things that
      we aren't interested in, then call `current`.  Which may *itself*
      call advance.
      
      While advancing the tree iterator, if we advance over things that
      we aren't interested in, then call `current`.  Which may *itself*
      call advance.
      
      While advancing the tree iterator, if we advance over things that
      we aren't interested in, then call `current`.  Which may *itself*
      call advance.
      
      Error: stack overflow.
      Edward Thomson committed
  3. 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
  4. 30 Aug, 2015 2 commits
  5. 28 Aug, 2015 3 commits
  6. 03 Aug, 2015 1 commit
  7. 26 Jul, 2015 1 commit
    • iterator: skip over errors in diriter init · 12786e0f
      An error here will typically mean that the directory was removed between
      the time we iterated the parent and the time we wanted to visit it in
      which case we should ignore it.
      
      Other kinds of errors such as permissions (or transient errors) also
      better dealt with by pretending we didn't see it.
      Carlos Martín Nieto committed
  8. 02 Jul, 2015 1 commit
  9. 29 Jun, 2015 1 commit
  10. 26 Jun, 2015 1 commit
  11. 25 Jun, 2015 1 commit
  12. 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
  13. 29 May, 2015 1 commit
    • git__tolower: a tolower() that isn't dumb · 75a4636f
      Some brain damaged tolower() implementations appear to want to
      take the locale into account, and this may require taking some
      insanely aggressive lock on the locale and slowing down what should
      be the most trivial of trivial calls for people who just want to
      downcase ASCII.
      Edward Thomson committed
  14. 28 May, 2015 2 commits
  15. 01 May, 2015 4 commits
  16. 28 Apr, 2015 2 commits
  17. 13 Feb, 2015 2 commits
  18. 23 Nov, 2014 1 commit
  19. 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
  20. 06 May, 2014 1 commit
    • Improve checks for ignore containment · f554611a
      The diff code was using an "ignored_prefix" directory to track if
      a parent directory was ignored that contained untracked files
      alongside tracked files. Unfortunately, when negative ignore rules
      were used for directories inside ignored parents, the wrong rules
      were applied to untracked files inside the negatively ignored
      child directories.
      
      This commit moves the logic for ignore containment into the workdir
      iterator (which is a better place for it), so the ignored-ness of
      a directory is contained in the frame stack during traversal.  This
      allows a child directory to override with a negative ignore and yet
      still restore the ignored state of the parent when we traverse out
      of the child.
      
      Along with this, there are some problems with "directory only"
      ignore rules on container directories.  Given "a/*" and "!a/b/c/"
      (where the second rule is a directory rule but the first rule is
      just a generic prefix rule), then the directory only constraint
      was having "a/b/c/d/file" match the first rule and not the second.
      This was fixed by having ignore directory-only rules test a rule
      against the prefix of a file with LEADINGDIR enabled.
      
      Lastly, spot checks for ignores using `git_ignore_path_is_ignored`
      were tested from the top directory down to the bottom to deal with
      the containment problem, but this is wrong. We have to test bottom
      to top so that negative subdirectory rules will be checked before
      parent ignore rules.
      
      This does change the behavior of some existing tests, but it seems
      only to bring us more in line with core Git, so I think those
      changes are acceptable.
      Russell Belfer committed
  21. 02 May, 2014 5 commits
  22. 24 Apr, 2014 1 commit
  23. 23 Apr, 2014 2 commits
    • Treat ignored, empty, and untracked dirs different · 219c89d1
      In the iterator, distinguish between ignores and empty directories
      so that diff and status can ignore empty directories, but checkout
      and stash can treat them as untracked items.
      Russell Belfer committed
    • Make checkout match diff for untracked/ignored dir · 37da3685
      When diff finds an untracked directory, it emulates Git behavior
      by looking inside the directory to see if there are any untracked
      items inside it. If there are only ignored items inside the dir,
      then diff considers it ignored, even if there is no direct ignore
      rule for it.
      
      Checkout was not copying this behavior - when it found an untracked
      directory, it just treated it as untracked.  Unfortunately, when
      combined with GIT_CHECKOUT_REMOVE_UNTRACKED, this made is seem that
      checkout (and stash, which uses checkout) was removing ignored
      items when you had only asked it to remove untracked ones.
      
      This commit moves the logic for advancing past an untracked dir
      while scanning for non-ignored items into an iterator helper fn,
      and uses that for both diff and checkout.
      Russell Belfer committed
  24. 17 Apr, 2014 3 commits