Fix the ls-remote command when there is no local repo
Bug: 436695 Change-Id: I567f9a8e355c7624efa3efc9bac4f3b9015afa97 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
2475d95374
commit
bbe99d5b39
|
@ -80,6 +80,11 @@ protected void run() throws Exception {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean requiresRepository() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void show(final AnyObjectId id, final String name)
|
||||
throws IOException {
|
||||
outw.print(id.name());
|
||||
|
|
|
@ -311,10 +311,14 @@ public static Transport open(final Repository local, final String remote)
|
|||
public static Transport open(final Repository local, final String remote,
|
||||
final Operation op) throws NotSupportedException,
|
||||
URISyntaxException, TransportException {
|
||||
final RemoteConfig cfg = new RemoteConfig(local.getConfig(), remote);
|
||||
if (doesNotExist(cfg))
|
||||
return open(local, new URIish(remote), null);
|
||||
return open(local, cfg, op);
|
||||
if (local != null) {
|
||||
final RemoteConfig cfg = new RemoteConfig(local.getConfig(), remote);
|
||||
if (doesNotExist(cfg))
|
||||
return open(local, new URIish(remote), null);
|
||||
return open(local, cfg, op);
|
||||
} else
|
||||
return open(new URIish(remote));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue