commands: project: Use remote name from manifest instead of 'origin'

To be consistent with repo (though I haven't actually checked the
behavior myself).

Fixes: #73

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
Ulf Magnusson 2018-10-16 05:49:56 +02:00 committed by Marti Bolivar
parent a11ed67f04
commit 7fec6f03c8
1 changed files with 3 additions and 2 deletions

View File

@ -479,7 +479,7 @@ def _fetch(project):
if not exists:
_inf(project, 'Creating repository for (name-and-path)')
_git_base(project, 'init (abspath)')
_git(project, 'remote add origin -- (url)')
_git(project, 'remote add -- (remote-name) (url)')
# Fetch the revision specified in the manifest into the manifest-rev branch
@ -495,7 +495,7 @@ def _fetch(project):
# when the revision is an annotated tag. ^{commit} type peeling isn't
# supported for the <src> in a <src>:<dst> refspec, so we have to do it
# separately.
_git(project, fetch_cmd + ' origin -- (revision)')
_git(project, fetch_cmd + ' -- (remote-name) (revision)')
_git(project, 'update-ref (qual-manifest-rev-branch) FETCH_HEAD^{commit}')
if not _ref_ok(project, 'HEAD'):
@ -753,6 +753,7 @@ def _expand_shorthands(project, s):
.replace('(name-and-path)',
'{} ({})'.format(
project.name, os.path.join(project.path, ""))) \
.replace('(remote-name)', project.remote.name) \
.replace('(url)', project.url) \
.replace('(path)', project.path) \
.replace('(abspath)', project.abspath) \