diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2019-01-20 15:12:45 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2019-01-20 15:12:45 +0900 |
commit | 1a2db96c79f3e6fdf402ffa9f85f8e48303ac8ff (patch) | |
tree | 3c9421c5391e652492d41378fdd6b5e417828c17 /org.eclipse.jgit.pgm | |
parent | 283830a6437ae05f06f65da2f96321beb6196318 (diff) | |
download | jgit-1a2db96c79f3e6fdf402ffa9f85f8e48303ac8ff.tar.gz jgit-1a2db96c79f3e6fdf402ffa9f85f8e48303ac8ff.zip |
Stop using deprecated methods of RemoteSetUrlCommand/RemoteRemoveCommand
Change-Id: I5234474b359a32bdae501b181f0726be2af1ec6a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java index 63eba15abc..efd61fae16 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java @@ -53,6 +53,7 @@ import org.eclipse.jgit.api.RemoteAddCommand; import org.eclipse.jgit.api.RemoteListCommand; import org.eclipse.jgit.api.RemoteRemoveCommand; import org.eclipse.jgit.api.RemoteSetUrlCommand; +import org.eclipse.jgit.api.RemoteSetUrlCommand.UriType; import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.pgm.internal.CLIText; import org.eclipse.jgit.pgm.opt.CmdLineParser; @@ -99,13 +100,13 @@ class Remote extends TextBuiltin { cmd.call(); } else if ("remove".equals(command) || "rm".equals(command)) { //$NON-NLS-1$ //$NON-NLS-2$ RemoteRemoveCommand cmd = git.remoteRemove(); - cmd.setName(name); + cmd.setRemoteName(name); cmd.call(); } else if ("set-url".equals(command)) { //$NON-NLS-1$ RemoteSetUrlCommand cmd = git.remoteSetUrl(); - cmd.setName(name); - cmd.setUri(new URIish(uri)); - cmd.setPush(push); + cmd.setRemoteName(name); + cmd.setRemoteUri(new URIish(uri)); + cmd.setUriType(push ? UriType.PUSH : UriType.FETCH); cmd.call(); } else if ("update".equals(command)) { //$NON-NLS-1$ // reuse fetch command for basic implementation of remote update |