public class RemoteSetUrlCommand extends GitCommand<RemoteConfig>
call()
method to finally execute the command.repo
Modifier | Constructor and Description |
---|---|
protected |
RemoteSetUrlCommand(Repository repo)
Constructor for RemoteSetUrlCommand.
|
Modifier and Type | Method and Description |
---|---|
RemoteConfig |
call() |
void |
setName(String name)
The name of the remote to change the URL for.
|
void |
setPush(boolean push)
Whether to change the push URL of the remote instead of the fetch URL.
|
void |
setUri(URIish uri)
The new URL for the remote.
|
checkCallable, getRepository, setCallable
protected RemoteSetUrlCommand(Repository repo)
Constructor for RemoteSetUrlCommand.
repo
- the Repository
public void setName(String name)
name
- a remote namepublic void setUri(URIish uri)
uri
- an URL for the remotepublic void setPush(boolean push)
push
- true
to set the push url, false
to
set the fetch urlpublic RemoteConfig call() throws GitAPIException
Execute the command
Executes the remote
command with all the options and parameters
collected by the setter methods of this class.
call
in interface Callable<RemoteConfig>
call
in class GitCommand<RemoteConfig>
GitAPIException
Copyright © 2018 Eclipse JGit Project. All rights reserved.