Fix: GitError when using repo info -d
If a workspace is initialised with:
repo init -u git://path/to/manifest -b manifest-branch
and the default.xml specifies the default revision as `other-branch`,
running `repo info -d` results in a GitError:
fatal: bad revision 'refs/remotes/m/other-branch..'
The repo info command uses the default revision to build the symlink
to the remote revision which is passed to the `git rev-list` command.
This is incorrect; the manifest's branch name should be used.
Change-Id: Ibae5b91869848276785facfaef433e38d49fd726
diff --git a/subcmds/info.py b/subcmds/info.py
index d2d4f5e..a6eba88 100644
--- a/subcmds/info.py
+++ b/subcmds/info.py
@@ -111,7 +111,7 @@
if not self.opt.local:
project.Sync_NetworkHalf(quiet=True, current_branch_only=True)
- logTarget = R_M + self.manifest.default.revisionExpr
+ logTarget = R_M + self.manifest.manifestProject.config.GetBranch("default").merge
bareTmp = project.bare_git._bare
project.bare_git._bare = False