1. 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
  2. 20 Jun, 2015 1 commit
  3. 16 Jun, 2015 1 commit
  4. 02 Jun, 2015 1 commit
  5. 28 May, 2015 4 commits
  6. 20 May, 2015 1 commit
  7. 04 May, 2015 1 commit
  8. 17 Apr, 2015 1 commit
  9. 03 Mar, 2015 2 commits
  10. 05 Dec, 2014 1 commit
  11. 23 Nov, 2014 1 commit
  12. 09 Nov, 2014 1 commit
  13. 07 Nov, 2014 2 commits
  14. 06 Nov, 2014 1 commit
  15. 05 Nov, 2014 1 commit
  16. 13 Aug, 2014 1 commit
  17. 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
  18. 01 Jul, 2014 1 commit
  19. 04 Jun, 2014 2 commits
  20. 30 May, 2014 2 commits
  21. 22 May, 2014 2 commits
  22. 21 May, 2014 1 commit
  23. 15 May, 2014 2 commits
  24. 14 May, 2014 1 commit
  25. 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
  26. 02 May, 2014 5 commits