aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src/org
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2014-12-04 01:47:21 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2014-12-22 15:45:46 +0100
commit15e8b4fb2e0367f1f66569da4e32ac730feb9119 (patch)
treee08491b9bfd2dc9d3987ebd5a46a2b7371ddabad /org.eclipse.jgit.pgm/src/org
parent563c1ad514ada9af13f2a1955a10000137804527 (diff)
downloadjgit-15e8b4fb2e0367f1f66569da4e32ac730feb9119.tar.gz
jgit-15e8b4fb2e0367f1f66569da4e32ac730feb9119.zip
[pgm] Add option --bare to clone command
Change-Id: I528491e3e20d3c9ebe37fe3cd2bf85b4644d8698 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
index 88ea1202d7..cd6953cb05 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
@@ -67,6 +67,9 @@ class Clone extends AbstractFetchCommand {
@Option(name = "--no-checkout", aliases = { "-n" }, usage = "usage_noCheckoutAfterClone")
private boolean noCheckout;
+ @Option(name = "--bare", usage = "usage_bareClone")
+ private boolean isBare;
+
@Argument(index = 0, required = true, metaVar = "metaVar_uriish")
private String sourceUri;
@@ -101,7 +104,7 @@ class Clone extends AbstractFetchCommand {
branch = Constants.HEAD;
CloneCommand command = Git.cloneRepository();
- command.setURI(sourceUri).setRemote(remoteName)
+ command.setURI(sourceUri).setRemote(remoteName).setBare(isBare)
.setNoCheckout(noCheckout).setBranch(branch);
command.setGitDir(gitdir == null ? null : new File(gitdir));