From 2816d4f387042b5ee38b27f1c9ef0b3f313165ed Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Tue, 3 Mar 2009 17:53:18 -0800 Subject: Set core.bare to true on mirror repositories When creating a mirror repository we will always be using a bare repository. Setting $GIT_DIR/config to have core.bare = true is reasonable and helps Git to recognize the environment it is in. Signed-off-by: Shawn O. Pearce --- project.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'project.py') diff --git a/project.py b/project.py index adb7f669..b9792523 100644 --- a/project.py +++ b/project.py @@ -851,7 +851,11 @@ class Project(object): if not os.path.exists(self.gitdir): os.makedirs(self.gitdir) self.bare_git.init() - self.config.SetString('core.bare', None) + + if self.manifest.IsMirror: + self.config.SetString('core.bare', 'true') + else: + self.config.SetString('core.bare', None) hooks = self._gitdir_path('hooks') try: -- cgit v1.2.3-54-g00ecf