summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Neus <jackneus@google.com>2021-10-11 17:20:39 +0000
committerJack Neus <jackneus@google.com>2021-10-11 18:57:57 +0000
commit76491590b890e5be70bd17996c12ff2a8fe1e218 (patch)
treea86488185d54e346a9f600341718e881a31e9705
parent6a74c91f50c404d9a3a181f586de94aa2c3f0101 (diff)
downloadgit-repo-76491590b890e5be70bd17996c12ff2a8fe1e218.tar.gz
repo: fix bug with --standalone-manifest
We were accidentally always setting manifest.standlone in config, which was messing up behavior for standard use cases. BUG=gerrit:15160 TEST=manual runs Change-Id: Ic80f084ae97de5721aced3bb52d3ea9115f8d833 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/320715 Tested-by: Jack Neus <jackneus@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
-rw-r--r--subcmds/init.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/subcmds/init.py b/subcmds/init.py
index 9c6b2ad9..53c6ba04 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -166,12 +166,14 @@ to update the working directory files.
166 standalone_manifest = False 166 standalone_manifest = False
167 if opt.standalone_manifest: 167 if opt.standalone_manifest:
168 standalone_manifest = True 168 standalone_manifest = True
169 elif not opt.manifest_url: 169 m.config.SetString('manifest.standalone', opt.manifest_url)
170 elif not opt.manifest_url and not opt.manifest_branch:
170 # If -u is set and --standalone-manifest is not, then we're not in 171 # If -u is set and --standalone-manifest is not, then we're not in
171 # standalone mode. Otherwise, use config to infer what we were in the last 172 # standalone mode. Otherwise, use config to infer what we were in the last
172 # init. 173 # init.
173 standalone_manifest = bool(m.config.GetString('manifest.standalone')) 174 standalone_manifest = bool(m.config.GetString('manifest.standalone'))
174 m.config.SetString('manifest.standalone', opt.manifest_url) 175 if not standalone_manifest:
176 m.config.SetString('manifest.standalone', None)
175 177
176 self._ConfigureDepth(opt) 178 self._ConfigureDepth(opt)
177 179