libgit2/tests-clay
Brodie Rao ce8cd006ce fileops/repository: create (most) directories with 0777 permissions
To further match how Git behaves, this change makes most of the
directories libgit2 creates in a git repo have a file mode of
0777. Specifically:

- Intermediate directories created with git_futils_mkpath2file() have
  0777 permissions. This affects odb_loose, reflog, and refs.

- The top level folder for bare repos is created with 0777
  permissions.

- The top level folder for non-bare repos is created with 0755
  permissions.

- /objects/info/, /objects/pack/, /refs/heads/, and /refs/tags/ are
  created with 0777 permissions.

Additionally, the following changes have been made:

- fileops functions that create intermediate directories have grown a
  new dirmode parameter. The only exception to this is filebuf's
  lock_file(), which unconditionally creates intermediate directories
  with 0777 permissions when GIT_FILEBUF_FORCE is set.

- The test runner now sets the umask to 0 before running any
  tests. This ensurses all file mode checks are consistent across
  systems.

- t09-tree.c now does a directory permissions check. I've avoided
  adding this check to other tests that might reuse existing
  directories from the prefabricated test repos. Because they're
  checked into the repo, they have 0755 permissions.

- Other assorted directories created by tests have 0777 permissions.
2011-10-14 16:04:34 -07:00
..
core fileops/repository: create (most) directories with 0777 permissions 2011-10-14 16:04:34 -07:00
network Make repo config loading automatic or completely explicit 2011-09-27 14:40:56 +02:00
object/tree tree: Add git_tree_frompath() which, given a relative path to a tree entry, retrieves the tree object containing this tree entry 2011-10-13 23:30:07 +02:00
status Backport t18 fixes to Clay 2011-09-19 05:41:25 +03:00
clay tests-clay: update clay 2011-10-07 23:02:02 +02:00
clay_libgit2.h Come out and Clay 2011-09-15 01:12:46 +02:00
clay_main.c tree: Add git_tree_frompath() which, given a relative path to a tree entry, retrieves the tree object containing this tree entry 2011-10-13 23:30:07 +02:00
clay.h tree: Add git_tree_frompath() which, given a relative path to a tree entry, retrieves the tree object containing this tree entry 2011-10-13 23:30:07 +02:00
README.md tests-clay: add a readme file 2011-10-07 23:13:09 +02:00

Writing Clay tests for libgit2

For information on the Clay testing framework and a detailed introduction please visit:

https://github.com/tanoku/clay

  • Write your modules and tests. Use good, meaningful names.

  • Mix the tests:

      ./clay
    
  • Make sure you actually build the tests by setting:

      BUILD_CLAY=ON
    
  • Test:

      ./build/libgit2_clay
    
  • Make sure everything is fine.

  • Send your pull request. That's it.