libgit2/tests-clar
Russell Belfer 991a56c704 Add flag to write gitlink on setting repo workdir
This added a flag to the `git_repository_set_workdir()` function
that enables generation of a `.git` gitlink file that links the
new workdir to the parent repository.  Essentially, the flag tells
the function to write out the changes to disk to permanently set
the workdir of the repository to the new path.

If you pass this flag as true, then setting the workdir to something
other than the default workdir (i.e. the parent of the .git repo
directory), will create a plain file named ".git" with the standard
gitlink contents "gitdir: <repo-path>", and also update the
"core.worktree" and "core.bare" config values.

Setting the workdir to the default repo workdir will clear the
core.worktree flag (but still permanently set core.bare to false).

BTW, the libgit2 API does not currently provide a function for
clearing the workdir and converting a non-bare repo into a bare one.
2012-07-10 23:19:47 -07:00
..
attr Fix bugs for status with spaces and reloaded attrs 2012-05-24 17:14:56 -07:00
buf Update test suite 2012-05-02 16:14:30 -07:00
commit errors: Rename the generic return codes 2012-05-18 01:26:26 +02:00
config Adding git_config_foreach_match() iteration fn 2012-07-10 23:19:47 -07:00
core Add path utilities to resolve relative paths 2012-07-10 23:19:47 -07:00
date Omit failing test on 32-bit machines. 2012-06-06 12:39:29 -07:00
diff diff: make inter-hunk-context default value git-compliant 2012-07-02 17:27:49 +02:00
index Make index add/append support core.filemode flag 2012-06-19 14:27:02 -07:00
network notes: add test resource with faked two-level fanout 2012-06-08 00:17:08 +02:00
notes notes: fix memory leaks 2012-06-21 10:33:24 +02:00
object Don't rmdir() nonexistent dirs in object::tree::frompath tests 2012-06-29 00:47:46 -07:00
odb clar: Fix warning 2012-05-16 19:24:35 +02:00
refs revparse: fix parsing of date specifiers 2012-07-02 19:56:41 +02:00
repo Add flag to write gitlink on setting repo workdir 2012-07-10 23:19:47 -07:00
reset Add git_reset() 2012-06-07 21:27:30 +02:00
resources diff: make inter-hunk-context default value git-compliant 2012-07-02 17:27:49 +02:00
revwalk clar: Fix warnings 2012-06-19 02:43:36 +02:00
status Add flag to write gitlink on setting repo workdir 2012-07-10 23:19:47 -07:00
threads t13-threads.c ported. 2012-03-30 13:05:54 -07:00
clar Fixed mode on clar 2012-05-10 11:15:37 -07:00
clar_helpers.c Make index add/append support core.filemode flag 2012-06-19 14:27:02 -07:00
clar_libgit2.h Make index add/append support core.filemode flag 2012-06-19 14:27:02 -07:00
README.md Rename the Clay test suite to Clar 2012-01-24 20:35:15 -08:00

Writing Clar tests for libgit2

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

https://github.com/tanoku/clar

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

  • Make sure you actually build the tests by setting:

      cmake -DBUILD_CLAR=ON build/
    
  • Test:

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

  • Send your pull request. That's it.