1. 14 Sep, 2016 1 commit
    • checkout: don't try to calculate oid for directories · 955c99c2
      When trying to determine if we can safely overwrite an existing workdir
      item, we may need to calculate the oid for the workdir item to determine
      if its identical to the old side (and eligible for removal).
      
      We previously did this regardless of the type of entry in the workdir;
      if it was a directory, we would open(2) it and then try to read(2).
      The read(2) of a directory fails on many platforms, so we would treat it
      as if it were unmodified and continue to perform the checkout.
      
      On FreeBSD, you _can_ read(2) a directory, so this pattern failed.  We
      would calculate an oid from the data read and determine that the
      directory was modified and would therefore generate a checkout conflict.
      
      This reliance on read(2) is silly (and was most likely accidentally
      giving us the behavior we wanted), we should be explicit about the
      directory test.
      Edward Thomson committed
  2. 30 Aug, 2016 3 commits
  3. 29 Aug, 2016 4 commits
  4. 26 Aug, 2016 1 commit
  5. 24 Aug, 2016 2 commits
  6. 22 Aug, 2016 1 commit
  7. 17 Aug, 2016 4 commits
  8. 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
  9. 10 Aug, 2016 2 commits
  10. 09 Aug, 2016 4 commits
  11. 08 Aug, 2016 4 commits
  12. 06 Aug, 2016 2 commits
  13. 05 Aug, 2016 7 commits
  14. 04 Aug, 2016 4 commits