Change-Id: I4e369382b8a83a5c0772462d1b176b1e23910adatags/v0.7.0
@@ -73,7 +73,7 @@ import org.eclipse.jgit.transport.URIish; | |||
@Command(common = true, usage = "Clone a repository into a new directory") | |||
class Clone extends AbstractFetchCommand { | |||
@Option(name = "--origin", aliases = { "-o" }, metaVar = "name", usage = "use <name> instead of 'origin' to track upstream") | |||
private String remoteName = "origin"; | |||
private String remoteName = Constants.DEFAULT_REMOTE_NAME; | |||
@Argument(index = 0, required = true, metaVar = "uri-ish") | |||
private String sourceUri; |
@@ -1,5 +1,6 @@ | |||
/* | |||
* Copyright (C) 2008-2009, Google Inc. | |||
* Copyright (C) 2009, Mykola Nikishov <mn@mn.com.ua> | |||
* Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org> | |||
* and other copyright owners as documented in the project's IP log. | |||
* | |||
@@ -48,6 +49,7 @@ import java.util.List; | |||
import org.kohsuke.args4j.Argument; | |||
import org.kohsuke.args4j.Option; | |||
import org.eclipse.jgit.lib.Constants; | |||
import org.eclipse.jgit.lib.TextProgressMonitor; | |||
import org.eclipse.jgit.transport.FetchResult; | |||
import org.eclipse.jgit.transport.RefSpec; | |||
@@ -81,7 +83,7 @@ class Fetch extends AbstractFetchCommand { | |||
} | |||
@Argument(index = 0, metaVar = "uri-ish") | |||
private String remote = "origin"; | |||
private String remote = Constants.DEFAULT_REMOTE_NAME; | |||
@Argument(index = 1, metaVar = "refspec") | |||
private List<RefSpec> toget; |
@@ -65,7 +65,7 @@ class Push extends TextBuiltin { | |||
int timeout = -1; | |||
@Argument(index = 0, metaVar = "uri-ish") | |||
private String remote = "origin"; | |||
private String remote = Constants.DEFAULT_REMOTE_NAME; | |||
@Argument(index = 1, metaVar = "refspec") | |||
private final List<RefSpec> refSpecs = new ArrayList<RefSpec>(); |
@@ -258,6 +258,9 @@ public final class Constants { | |||
/** A gitignore file name */ | |||
public static final String GITIGNORE_FILENAME = ".gitignore"; | |||
/** Default remote name used by clone, push and fetch operations */ | |||
public static final String DEFAULT_REMOTE_NAME = "origin"; | |||
/** | |||
* Create a new digest function for objects. | |||
* |