diff options
| author | Shawn O. Pearce <sop@google.com> | 2009-03-03 17:53:18 -0800 |
|---|---|---|
| committer | Shawn O. Pearce <sop@google.com> | 2009-03-03 17:53:18 -0800 |
| commit | 2816d4f387042b5ee38b27f1c9ef0b3f313165ed (patch) | |
| tree | 12018b67cf103521128597628beee1b7580e8250 | |
| parent | 44469464d2e4ddbb217f92e962ff85dfd736772e (diff) | |
| download | git-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>
| -rw-r--r-- | project.py | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -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: |
