summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-11-30 08:24:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-12-01 19:00:15 (GMT)
commit31e26ebcb512ad234d9725120fb4f5670ff75625 (patch)
tree065370d0f48d3a715c888e2ee4bf796c45a11f16 /cache.h
parente61a509a497520550b5b84b753a95549158f9f1c (diff)
downloadgit-31e26ebcb512ad234d9725120fb4f5670ff75625.zip
git-31e26ebcb512ad234d9725120fb4f5670ff75625.tar.gz
git-31e26ebcb512ad234d9725120fb4f5670ff75625.tar.bz2
setup.c: support multi-checkout repo setup
The repo setup procedure is updated to detect $GIT_DIR/commondir and set $GIT_COMMON_DIR properly. The core.worktree is ignored when $GIT_COMMON_DIR is set. This is because the config file is shared in multi-checkout setup, but checkout directories _are_ different. Making core.worktree effective in all checkouts mean it's back to a single checkout. Helped-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index bce1a7d..9dc6ae0 100644
--- a/cache.h
+++ b/cache.h
@@ -437,6 +437,7 @@ extern char *get_object_directory(void);
extern char *get_index_file(void);
extern char *get_graft_file(void);
extern int set_git_dir(const char *path);
+extern int get_common_dir(struct strbuf *sb, const char *gitdir);
extern const char *get_git_namespace(void);
extern const char *strip_namespace(const char *namespaced_ref);
extern const char *get_git_work_tree(void);