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
This commit is contained in:
Olof Johansson 2013-01-29 08:22:05 +01:00 committed by David Pursehouse
parent 4e46520362
commit 57bd7b717b

View File

@ -111,7 +111,7 @@ class Info(PagedCommand):
if not self.opt.local: if not self.opt.local:
project.Sync_NetworkHalf(quiet=True, current_branch_only=True) 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 bareTmp = project.bare_git._bare
project.bare_git._bare = False project.bare_git._bare = False