1. 21 Jan, 2018 1 commit
    • status::renames: write NFD instead of NFC filename · 9af7fbc3
      Update the status::renames test to create an NFD format filename in the
      core.precomposedunicode tests.
      
      Previously, we would create an NFC format filename.  This was to take
      advantage of HFS+ filesystems, which always use canonically decomposed
      formats, and would actually write the filename to disk as an NFD
      filename.  So previously, we could create an NFC filename, but read it
      normally as an NFD filename.
      
      But APFS formats do not force canonically decomposed formats for
      filenames, so creating an NFC filename does not get converted to NFD.
      Instead, the filename will be written in NFC format.  Our test,
      therefore, does not work - when we write an NFC filename, it will
      _remain_ NFC.
      
      Update the test to write NFD always.  This will ensure that the file
      will actually be canonically decomposed on all platforms:  HFS+, which
      forces NFD, and APFS, which does not.
      
      Thus, our test will continue to ensure that an NFD filename is
      canonically precomposed on all filesystems.
      Edward Thomson committed
  2. 03 Jan, 2018 1 commit
    • tests: status::worktree: indicate skipped tests on Win32 · 72c28ab0
      Some function bodies of tests which are not applicable to the Win32
      platform are completely #ifdef'd out instead of calling `cl_skip()`.
      This leaves us with no indication that these tests are not being
      executed at all and may thus cause decreased scrutiny when investigating
      skipped tests. Improve the situation by calling `cl_skip()` instead of
      just doing nothing.
      Patrick Steinhardt committed
  3. 30 Nov, 2017 1 commit
  4. 25 Aug, 2017 1 commit
  5. 17 May, 2017 1 commit
  6. 17 Feb, 2017 2 commits
  7. 12 Aug, 2016 1 commit
    • ignore: allow unignoring basenames in subdirectories · fcb2c1c8
      The .gitignore file allows for patterns which unignore previous
      ignore patterns. When unignoring a previous pattern, there are
      basically three cases how this is matched when no globbing is
      used:
      
      1. when a previous file has been ignored, it can be unignored by
         using its exact name, e.g.
      
         foo/bar
         !foo/bar
      
      2. when a file in a subdirectory has been ignored, it can be
         unignored by using its basename, e.g.
      
         foo/bar
         !bar
      
      3. when all files with a basename are ignored, a specific file
         can be unignored again by specifying its path in a
         subdirectory, e.g.
      
         bar
         !foo/bar
      
      The first problem in libgit2 is that we did not correctly treat
      the second case. While we verified that the negative pattern
      matches the tail of the positive one, we did not verify if it
      only matches the basename of the positive pattern. So e.g. we
      would have also negated a pattern like
      
          foo/fruz_bar
          !bar
      
      Furthermore, we did not check for the third case, where a
      basename is being unignored in a certain subdirectory again.
      
      Both issues are fixed with this commit.
      Patrick Steinhardt committed
  8. 11 Apr, 2016 1 commit
  9. 31 Mar, 2016 2 commits
  10. 23 Mar, 2016 3 commits
  11. 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
  12. 13 Sep, 2015 1 commit
  13. 30 Aug, 2015 1 commit
  14. 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
  15. 20 Jun, 2015 1 commit
  16. 16 Jun, 2015 1 commit
  17. 02 Jun, 2015 1 commit
  18. 28 May, 2015 4 commits
  19. 20 May, 2015 1 commit
  20. 04 May, 2015 1 commit
  21. 17 Apr, 2015 1 commit
  22. 03 Mar, 2015 2 commits
  23. 05 Dec, 2014 1 commit
  24. 23 Nov, 2014 1 commit
  25. 09 Nov, 2014 1 commit
  26. 07 Nov, 2014 2 commits
  27. 06 Nov, 2014 1 commit
  28. 05 Nov, 2014 1 commit
  29. 13 Aug, 2014 1 commit
  30. 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