diff options
author | Shawn O. Pearce <sop@google.com> | 2009-07-03 16:24:57 -0700 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2009-07-03 20:03:38 -0700 |
commit | 75b87c8a5171b26947d0a13d970f09defac736e3 (patch) | |
tree | b8d3eb561b8faa2d3fc73e04d402128fdca1b8b3 /subcmds | |
parent | abb7a3dfecdfe98b30594219f24c5c3d5e11e990 (diff) | |
download | git-repo-75b87c8a5171b26947d0a13d970f09defac736e3.tar.gz |
Abstract manifest branch creation from init to the manifest object
This permits the XML style manifest to use 'default', while other
types can use their own creation strategy for the current branch.
Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'subcmds')
-rw-r--r-- | subcmds/init.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index ec87d036..0075b0b4 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -130,10 +130,9 @@ to update the working directory files. | |||
130 | m.Sync_LocalHalf(syncbuf) | 130 | m.Sync_LocalHalf(syncbuf) |
131 | syncbuf.Finish() | 131 | syncbuf.Finish() |
132 | 132 | ||
133 | if is_new or m.CurrentBranch is None: | 133 | if not self.manifest.InitBranch(): |
134 | if not m.StartBranch('default'): | 134 | print >>sys.stderr, 'fatal: cannot create branch in manifest' |
135 | print >>sys.stderr, 'fatal: cannot create default in manifest' | 135 | sys.exit(1) |
136 | sys.exit(1) | ||
137 | 136 | ||
138 | def _LinkManifest(self, name): | 137 | def _LinkManifest(self, name): |
139 | if not name: | 138 | if not name: |