org.xwiki.git.internal
Class GitScriptService
java.lang.Object
org.xwiki.git.internal.GitScriptService
- All Implemented Interfaces:
- ScriptService
@Component
@Named(value="git")
@Singleton
public class GitScriptService
- extends Object
- implements ScriptService
Various APIs to make it easy to perform Git commands from within scripts.
- Since:
- 4.2M1
Method Summary |
Repository |
getRepository(String repositoryURI,
String localDirectoryName)
Clone a Git repository by storing it locally in the XWiki Permanent directory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GitScriptService
public GitScriptService()
getRepository
public Repository getRepository(String repositoryURI,
String localDirectoryName)
- Clone a Git repository by storing it locally in the XWiki Permanent directory. If the repository is already
cloned, no action is done.
- Parameters:
repositoryURI
- the URI to the Git repository to clone (eg "git://github.com/xwiki/xwiki-commons.git")localDirectoryName
- the name of the directory where the Git repository will be cloned (this directory is
relative to the permanent directory
- Returns:
- the cloned Repository instance