mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Give a more friendly error in 'repo init' if manifest url is invalid
Instead of a stack trace ending in origin/master not existing we now tell the user the manifest url is invalid if 'git fetch' has failed out early. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
parent
1775dbe176
commit
1fc99f4e47
@ -124,7 +124,11 @@ default.xml will be used.
|
|||||||
print >>sys.stderr, 'fatal: --mirror not supported on existing client'
|
print >>sys.stderr, 'fatal: --mirror not supported on existing client'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
m.Sync_NetworkHalf()
|
if not m.Sync_NetworkHalf():
|
||||||
|
r = m.GetRemote(m.remote.name)
|
||||||
|
print >>sys.stderr, 'fatal: cannot obtain manifest %s' % r.url
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
m.Sync_LocalHalf()
|
m.Sync_LocalHalf()
|
||||||
if is_new:
|
if is_new:
|
||||||
m.StartBranch('default')
|
m.StartBranch('default')
|
||||||
|
Loading…
Reference in New Issue
Block a user