summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-03-03 17:53:18 -0800
committerShawn O. Pearce <sop@google.com>2009-03-03 17:53:18 -0800
commit2816d4f387042b5ee38b27f1c9ef0b3f313165ed (patch)
tree12018b67cf103521128597628beee1b7580e8250 /project.py
parent44469464d2e4ddbb217f92e962ff85dfd736772e (diff)
downloadgit-repo-2816d4f387042b5ee38b27f1c9ef0b3f313165ed.tar.gz
Set core.bare to true on mirror repositoriesv1.6.1
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 <sop@google.com>
Diffstat (limited to 'project.py')
-rw-r--r--project.py6
1 files changed, 5 insertions, 1 deletions
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):
851 if not os.path.exists(self.gitdir): 851 if not os.path.exists(self.gitdir):
852 os.makedirs(self.gitdir) 852 os.makedirs(self.gitdir)
853 self.bare_git.init() 853 self.bare_git.init()
854 self.config.SetString('core.bare', None) 854
855 if self.manifest.IsMirror:
856 self.config.SetString('core.bare', 'true')
857 else:
858 self.config.SetString('core.bare', None)
855 859
856 hooks = self._gitdir_path('hooks') 860 hooks = self._gitdir_path('hooks')
857 try: 861 try: