]> git.proxmox.com Git - libgit2.git/commit
Add template dir and set gid to repo init
authorRussell Belfer <rb@github.com>
Wed, 1 Aug 2012 00:02:54 +0000 (17:02 -0700)
committerRussell Belfer <rb@github.com>
Wed, 22 Aug 2012 23:07:19 +0000 (16:07 -0700)
commitca1b6e54095a7e28d468a832f143025feae6cd4f
tree0ff9b9fbf71cd4f0489985b64f57590687361cd2
parent662880ca60e4d1662bb10648522242ac54797720
Add template dir and set gid to repo init

This extends git_repository_init_ext further with support for
initializing the repository from an external template directory
and with support for the "create shared" type flags that make a
set GID repository directory.

This also adds tests for much of the new functionality to the
existing `repo/init.c` test suite.

Also, this adds a bunch of new utility functions including a
very general purpose `git_futils_mkdir` (with the ability to
make paths and to chmod the paths post-creation) and a file
tree copying function `git_futils_cp_r`.  Also, this includes
some new path functions that were useful to keep the code
simple.
29 files changed:
include/git2/config.h
include/git2/repository.h
src/attr_file.c
src/config.c
src/fileops.c
src/fileops.h
src/path.c
src/path.h
src/posix.h
src/repository.c
src/repository.h
src/unix/posix.h
src/win32/posix.h
tests-clar/core/copy.c [new file with mode: 0644]
tests-clar/core/mkdir.c [new file with mode: 0644]
tests-clar/repo/init.c
tests-clar/resources/template/branches/.gitignore [new file with mode: 0644]
tests-clar/resources/template/description [new file with mode: 0644]
tests-clar/resources/template/hooks/applypatch-msg.sample [new file with mode: 0755]
tests-clar/resources/template/hooks/commit-msg.sample [new file with mode: 0755]
tests-clar/resources/template/hooks/post-commit.sample [new file with mode: 0755]
tests-clar/resources/template/hooks/post-receive.sample [new file with mode: 0755]
tests-clar/resources/template/hooks/post-update.sample [new file with mode: 0755]
tests-clar/resources/template/hooks/pre-applypatch.sample [new file with mode: 0755]
tests-clar/resources/template/hooks/pre-commit.sample [new file with mode: 0755]
tests-clar/resources/template/hooks/pre-rebase.sample [new file with mode: 0755]
tests-clar/resources/template/hooks/prepare-commit-msg.sample [new file with mode: 0755]
tests-clar/resources/template/hooks/update.sample [new file with mode: 0755]
tests-clar/resources/template/info/exclude [new file with mode: 0644]