Package org.eclipse.jgit.api
Class RemoteSetUrlCommand
- All Implemented Interfaces:
Callable<RemoteConfig>
Used to change the URL of a remote.
This class has setters for all supported options and arguments of this
command and a
call() method to finally execute the command.- Since:
- 4.2
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe available URI types for the remote. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate URIishprivate RemoteSetUrlCommand.UriTypeFields inherited from class org.eclipse.jgit.api.GitCommand
repo -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor for RemoteSetUrlCommand. -
Method Summary
Modifier and TypeMethodDescriptioncall()voidDeprecated.voidsetPush(boolean push) Deprecated.setRemoteName(String remoteName) The name of the remote to change the URL for.setRemoteUri(URIish remoteUri) The new URL for the remote.voidDeprecated.usesetRemoteUri(org.eclipse.jgit.transport.URIish)insteadWhether to change the push URL of the remote instead of the fetch URL.Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
-
Field Details
-
remoteName
-
remoteUri
-
type
-
-
Constructor Details
-
RemoteSetUrlCommand
Constructor for RemoteSetUrlCommand.
- Parameters:
repo- theRepository
-
-
Method Details
-
setName
Deprecated.usesetRemoteName(java.lang.String)insteadThe name of the remote to change the URL for.- Parameters:
name- a remote name
-
setRemoteName
The name of the remote to change the URL for.- Parameters:
remoteName- a remote remoteName- Returns:
this- Since:
- 5.3
-
setUri
Deprecated.usesetRemoteUri(org.eclipse.jgit.transport.URIish)insteadThe new URL for the remote.- Parameters:
uri- an URL for the remote
-
setRemoteUri
The new URL for the remote.- Parameters:
remoteUri- an URL for the remote- Returns:
this- Since:
- 5.3
-
setPush
Deprecated.Whether to change the push URL of the remote instead of the fetch URL.- Parameters:
push-trueto set the push url,falseto set the fetch url
-
setUriType
Whether to change the push URL of the remote instead of the fetch URL.- Parameters:
type- theUriTypevalue to set- Returns:
this- Since:
- 5.3
-
call
Execute the command
Executes the
remotecommand with all the options and parameters collected by the setter methods of this class.- Specified by:
callin interfaceCallable<RemoteConfig>- Specified by:
callin classGitCommand<RemoteConfig>- Throws:
GitAPIException
-
setRemoteName(java.lang.String)instead