|
|
@ -49,13 +49,22 @@ import org.apache.tools.ant.Task; |
|
|
|
import org.eclipse.jgit.api.Git; |
|
|
|
import org.eclipse.jgit.api.Git; |
|
|
|
import org.eclipse.jgit.api.InitCommand; |
|
|
|
import org.eclipse.jgit.api.InitCommand; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Create an empty git repository. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @see <a href="http://www.kernel.org/pub/software/scm/git/docs/git-init.html" |
|
|
|
|
|
|
|
* >git-init(1)</a> |
|
|
|
|
|
|
|
*/ |
|
|
|
public class GitInitTask extends Task { |
|
|
|
public class GitInitTask extends Task { |
|
|
|
private File destination; |
|
|
|
private File destination; |
|
|
|
private boolean bare; |
|
|
|
private boolean bare; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
|
|
|
|
* Set the destination git repository. |
|
|
|
|
|
|
|
* |
|
|
|
* @param dest |
|
|
|
* @param dest |
|
|
|
* the directory to init to |
|
|
|
* the destination directory that should be initialized with the |
|
|
|
|
|
|
|
* git repository. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void setDest(File dest) { |
|
|
|
public void setDest(File dest) { |
|
|
|
this.destination = dest; |
|
|
|
this.destination = dest; |
|
|
@ -63,7 +72,8 @@ public class GitInitTask extends Task { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @param bare |
|
|
|
* @param bare |
|
|
|
* whether the repository is bare or not |
|
|
|
* whether the repository should be initialized to a bare |
|
|
|
|
|
|
|
* repository or not. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void setBare(boolean bare) { |
|
|
|
public void setBare(boolean bare) { |
|
|
|
this.bare = bare; |
|
|
|
this.bare = bare; |
|
|
|