1. 17 Nov, 2015 2 commits
  2. 14 Sep, 2015 1 commit
  3. 12 Jul, 2015 1 commit
  4. 02 Jul, 2015 1 commit
  5. 28 May, 2015 1 commit
  6. 04 Feb, 2015 1 commit
  7. 14 Jan, 2015 1 commit
  8. 09 Dec, 2014 1 commit
  9. 26 Nov, 2014 1 commit
  10. 15 Jul, 2014 1 commit
  11. 15 May, 2014 1 commit
    • Better search path sandboxing · 8487e237
      There are a number of tests that modify the global or system
      search paths during the tests.  This adds a helper function to
      make it easier to restore those paths and makes sure that they
      are getting restored in a manner that preserves test isolation.
      Russell Belfer committed
  12. 08 May, 2014 1 commit
  13. 02 May, 2014 2 commits
    • Some further sandboxing cleanups to tests · 99dfa470
      Trying to find other issues where tests may not clean up quite
      properly when they are through...
      Russell Belfer committed
    • Improve handling of fake home directory · 0f603132
      There are a few tests that set up a fake home directory and a
      fake GLOBAL search path so that we can test things in global
      ignore or attribute or config files.  This cleans up that code to
      work more robustly even if there is a test failure.  This also
      fixes some valgrind warnings where scanning search paths for
      separators could end up doing a little bit of sketchy data access
      when coming to the end of search list.
      Russell Belfer committed
  14. 20 Apr, 2014 1 commit
  15. 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
  16. 09 Feb, 2014 2 commits
  17. 14 Nov, 2013 1 commit
  18. 08 Oct, 2013 3 commits
    • Make reference lookups apply precomposeunicode · 92dac975
      Before these changes, looking up a reference would return the
      same precomposed or decomposed form of the reference name that
      was used to look it up, so on MacOS which ignores the difference
      between the two, a single reference could be looked up either way
      and git_reference_name would return the form of the name that was
      used to look it up!  This change makes lookup always return the
      precomposed name if core.precomposeunicode is set regardless of
      which version was used to look it up.  The reference iterator was
      already returning the precomposed form from earlier work.
      
      This also updates the CMakeLists.txt rules for enabling iconv
      usage because the clar tests for this code were actually not being
      activated properly with the old version.
      
      Finally, this moves git_repository_reset_filesystem from include/
      git2/repository.h to include/git2/sys/repository.h since it is not
      really a function that normal library users should have to think
      about very often.
      Russell Belfer committed
    • More filemode cleanups for FAT on MacOS · 14997dc5
      This cleans up some additional issues.  The main change is that
      on a filesystem that doesn't support mode bits, libgit2 will now
      create new blobs with GIT_FILEMODE_BLOB always instead of being
      at the mercy to the filesystem driver to report executable or not.
      This means that if "core.filemode" lies and claims that filemode
      is not supported, then we will ignore the executable bit from the
      filesystem.  Previously we would have allowed it.
      
      This adds an option to the new git_repository_reset_filesystem to
      recurse through submodules if desired.  There may be other types
      of APIs that would like a "recurse submodules" option, but this
      one is particularly useful.
      
      This also has a number of cleanups, etc., for related things
      including trying to give better error messages when problems come
      up from the filesystem.  For example, the FAT filesystem driver on
      MacOS appears to return errno EINVAL if you attempt to write a
      filename with invalid UTF-8 in it.  We try to capture that with a
      better error message now.
      Russell Belfer committed
  19. 04 Oct, 2013 1 commit
    • Add git_repository_reset_filesystem and fix tests · 5173ea92
      When a repository is transferred from one file system to another,
      many of the config settings that represent the properties of the
      file system may be wrong.  This adds a new public API that will
      refresh the config settings of the repository to account for the
      change of file system.  This doesn't do a full "reinitialize" and
      operates on a existing git_repository object refreshing the config
      when done.
      
      This commit then makes use of the new API in clar as each test
      repository is set up.
      
      This commit also has a number of other clar test fixes where we
      were making assumptions about the type of filesystem, either based
      on outdated config data or based on the OS instead of the FS.
      Russell Belfer committed
  20. 03 Oct, 2013 1 commit
    • Initial iconv hookup for precomposed unicode · 219d3457
      This hooks up git_path_direach and git_path_dirload so that they
      will take a flag indicating if directory entry names should be
      tested and converted from decomposed unicode to precomposed form.
      This code will only come into play on the Apple platform and even
      then, only when certain types of filesystems are used.
      
      This involved adding a flag to these functions which involved
      changing a lot of places in the code.
      
      This was an opportunity to do a bit of code cleanup here and there,
      for example, getting rid of the git_futils_cleanupdir_r function in
      favor of a simple flag to git_futils_rmdir_r to not remove the top
      level entry.  That ended up adding depth tracking during rmdir_r
      which led to a safety check for infinite directory recursion.  Yay.
      
      This hasn't actually been tested on the Mac filesystems where the
      issue occurs.  I still need to get test environment for that.
      Russell Belfer committed
  21. 26 Sep, 2013 1 commit
  22. 24 Sep, 2013 1 commit
  23. 17 Sep, 2013 3 commits
    • Some tests with ident and crlf filters · 37f9e409
      Fixed the filter order to match core Git, too.
      
      This test demonstrates an interesting behavior of core Git (which
      is totally reasonable and which libgit2 matches, although mostly
      by coincidence).  If you use the ident filter and commit a file
      with a garbage ident in it, like '$Id: this is just garbage$' and
      then immediately do a 'git checkout-index' with the new file, Git
      will not consider the file out of date and will not overwrite the
      file with an updated $Id$.  Libgit2 has the same behavior.  If you
      remove the file and then do a checkout-index, it will be replaced
      with a filtered version that has injected the OID correctly.
      Russell Belfer committed
    • Add clar helper to create new commit from index · 155fa234
      There were a lot of places in the test code base that were creating
      a commit from the index on the current branch.  This just adds a
      helper to handle that case pretty easily.  There was only one test
      where this change ended up tweaking the test data, so pretty easy
      and mostly just a cleanup.
      Russell Belfer committed
    • Add clar helpers for testing file equality · 13f36ffb
      These are a couple of new clar helpers for testing that a file
      has expected contents that I extracted from the checkout code.
      
      Actually wrote this as part of an abandoned earlier attempt at a
      new filters API, but it will be useful now for some of the tests
      I'm going to write.
      Russell Belfer committed
  24. 04 Sep, 2013 1 commit
  25. 13 Aug, 2013 3 commits
  26. 08 Aug, 2013 2 commits
  27. 07 Aug, 2013 1 commit
  28. 05 Aug, 2013 1 commit
  29. 10 May, 2013 1 commit
    • Improve ignore handling in git_status_file · 1f9e41ee
      The git_status_file API was doing a hack to deal with files that
      are inside ignored directories.  The status scan was not reporting
      any file in this case, so git_status_file would attempt a final
      "stat()" call, and return IGNORED if the file actually existed.
      
      On case-insensitive filesystems where core.ignorecase is set
      incorrectly, this magic check can "succeed" and report a file
      as ignored when it should actually return ENOTFOUND.
      
      Now that we have the GIT_STATUS_OPT_RECURSE_IGNORED_DIRS, we can
      use that flag to make sure that git_status_file() will look into
      ignored directories and eliminate the hack completely, so we give
      the correct error.
      Russell Belfer committed
  30. 22 Mar, 2013 1 commit