2 * Copyright (C) 2012 the libgit2 contributors
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
7 #ifndef INCLUDE_repo_template_h__
8 #define INCLUDE_repo_template_h__
10 #define GIT_OBJECTS_INFO_DIR GIT_OBJECTS_DIR "info/"
11 #define GIT_OBJECTS_PACK_DIR GIT_OBJECTS_DIR "pack/"
13 #define GIT_HOOKS_DIR "hooks/"
14 #define GIT_HOOKS_DIR_MODE 0755
16 #define GIT_HOOKS_README_FILE GIT_HOOKS_DIR "README.sample"
17 #define GIT_HOOKS_README_MODE 0755
18 #define GIT_HOOKS_README_CONTENT \
21 "# Place appropriately named executable hook scripts into this directory\n"\
22 "# to intercept various actions that git takes. See `git help hooks` for\n"\
23 "# more information.\n"
25 #define GIT_INFO_DIR "info/"
26 #define GIT_INFO_DIR_MODE 0755
28 #define GIT_INFO_EXCLUDE_FILE GIT_INFO_DIR "exclude"
29 #define GIT_INFO_EXCLUDE_MODE 0644
30 #define GIT_INFO_EXCLUDE_CONTENT \
31 "# File patterns to ignore; see `git help ignore` for more information.\n"\
32 "# Lines that start with '#' are comments.\n"
34 #define GIT_DESC_FILE "description"
35 #define GIT_DESC_MODE 0644
36 #define GIT_DESC_CONTENT \
37 "Unnamed repository; edit this file 'description' to name the repository.\n"
45 static repo_template_item repo_template
[] = {
46 { GIT_OBJECTS_INFO_DIR
, GIT_OBJECT_DIR_MODE
, NULL
}, /* '/objects/info/' */
47 { GIT_OBJECTS_PACK_DIR
, GIT_OBJECT_DIR_MODE
, NULL
}, /* '/objects/pack/' */
48 { GIT_REFS_HEADS_DIR
, GIT_REFS_DIR_MODE
, NULL
}, /* '/refs/heads/' */
49 { GIT_REFS_TAGS_DIR
, GIT_REFS_DIR_MODE
, NULL
}, /* '/refs/tags/' */
50 { GIT_HOOKS_DIR
, GIT_HOOKS_DIR_MODE
, NULL
}, /* '/hooks/' */
51 { GIT_INFO_DIR
, GIT_INFO_DIR_MODE
, NULL
}, /* '/info/' */
52 { GIT_DESC_FILE
, GIT_DESC_MODE
, GIT_DESC_CONTENT
},
53 { GIT_HOOKS_README_FILE
, GIT_HOOKS_README_MODE
, GIT_HOOKS_README_CONTENT
},
54 { GIT_INFO_EXCLUDE_FILE
, GIT_INFO_EXCLUDE_MODE
, GIT_INFO_EXCLUDE_CONTENT
},