diff --git a/subcmds/sync.py b/subcmds/sync.py index ae29f085..dadf2e45 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -845,6 +845,13 @@ later is required to fix a server side protocol bug. rp = self.manifest.repoProject rp.PreSync() + cb = rp.CurrentBranch + if cb: + base = rp.GetBranch(cb).merge + if not base or not base.startswith('refs/heads/'): + print('warning: repo is not tracking a remote branch, so it will not ' + 'receive updates; run `repo init --repo-branch=stable` to fix.', + file=sys.stderr) mp = self.manifest.manifestProject mp.PreSync()