1. 05 Dec, 2014 1 commit
  2. 23 Nov, 2014 1 commit
  3. 09 Nov, 2014 1 commit
  4. 07 Nov, 2014 2 commits
  5. 06 Nov, 2014 1 commit
  6. 05 Nov, 2014 1 commit
  7. 13 Aug, 2014 1 commit
  8. 08 Aug, 2014 2 commits
    • Demonstrate a trailing slash failure. · bbe13802
      `git help ignore` has this to say about trailing slashes:
      
      > If the pattern ends with a slash, it is removed for the purpose of
      > the following description, but it would only find a match with a
      > directory. In other words, foo/ will match a directory foo and
      > paths underneath it, but will not match a regular file or a
      > symbolic link foo (this is consistent with the way how pathspec
      > works in general in Git).
      
      Sure enough, having manually performed the same steps as this test,
      `git status` tells us the following:
      
      	# On branch master
      	#
      	# Initial commit
      	#
      	# Changes to be committed:
      	#   (use "git rm --cached <file>..." to unstage)
      	#
      	#	new file:   force.txt
      	#
      	# Untracked files:
      	#   (use "git add <file>..." to include in what will be committed)
      	#
      	#	../.gitignore
      	#	child1/
      	#	child2/
      
      i.e. neither child1 nor child2 is ignored.
      Rob Rix committed
    • status: failing test with slash-star · aa5cdf63
      When writing 'bin/*' in the rules, this means we ignore very file inside
      bin/ individually, but do not ignore the directory itself. Thus the
      status listing should list both files under bin/, one untracked and one
      ignored.
      Carlos Martín Nieto committed
  9. 01 Jul, 2014 1 commit
  10. 04 Jun, 2014 2 commits
  11. 30 May, 2014 2 commits
  12. 22 May, 2014 2 commits
  13. 21 May, 2014 1 commit
  14. 15 May, 2014 2 commits
  15. 14 May, 2014 1 commit
  16. 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
  17. 02 May, 2014 6 commits
  18. 24 Apr, 2014 3 commits
  19. 18 Apr, 2014 3 commits
  20. 17 Apr, 2014 1 commit
  21. 14 Apr, 2014 1 commit
    • Fix core.excludesfile named .gitignore · a9528b8f
      Ignore rules with slashes in them are matched using FNM_PATHNAME
      and use the path to the .gitignore file from the root of the
      repository along with the path fragment (including slashes) in
      the ignore file itself.  Unfortunately, the relative path to the
      .gitignore file was being applied to the global core.excludesfile
      if that was also named ".gitignore".
      
      This fixes that with more precise matching and includes test for
      ignore rules with leading slashes (which were the primary example
      of this being broken in the real world).
      
      This also backports an improvement to the file context logic from
      the threadsafe-iterators branch where we don't rely on mutating
      the key of the attribute file name to generate the context path.
      Russell Belfer committed
  22. 10 Apr, 2014 1 commit
    • Fix bug popping ignore files during wd iteration · 8f7bc646
      There were a couple bugs in popping ignore files during iteration
      that could result in incorrect decisions be made and thus ignore
      files below the root either not being loaded correctly or not
      being popped at the right time.
      
      One bug was an off-by-one in comparing the path of the gitignore
      file with the path being exited during iteration.
      
      The second bug was not correctly truncating the path being tracked
      during traversal if there were no ignores on the list (i.e. when
      you have no .gitignore at the root, but do have some in contained
      directories).
      Russell Belfer committed
  23. 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
  24. 02 Apr, 2014 1 commit
  25. 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