public class PluginScmGit extends Object
Modifier and Type | Method and Description |
---|---|
static String |
branch(File workspace)
Short name of current branch.
|
static String |
branchSpec(File workspace)
Spec name of current branch.
|
static org.eclipse.jgit.dircache.DirCache |
doAdd(File workspace,
String pattern)
See
Git.add() |
static org.eclipse.jgit.api.CheckoutResult |
doCheckout(File workspace,
String localBranch,
String remoteName,
String remoteBranch)
See
Git.checkout() |
static Set<String> |
doClean(File workspace)
Remove untracked files.
|
static org.eclipse.jgit.api.Git |
doClone(File workspace,
String uri,
String remote)
Destroy workspace and clone from scratch.
|
static org.eclipse.jgit.revwalk.RevCommit |
doCommit(File workspace,
org.eclipse.jgit.lib.PersonIdent person,
String message)
See
Git.commit() |
static org.eclipse.jgit.transport.FetchResult |
doFetch(File workspace,
String remote,
org.eclipse.jgit.transport.RefSpec spec)
See
Git.fetch() |
static org.eclipse.jgit.api.MergeResult |
doMerge(File workspace,
org.eclipse.jgit.lib.ObjectId commit)
See
Git.merge() |
static org.eclipse.jgit.api.PullResult |
doPull(File workspace)
See
Git.pull() |
static Iterable<org.eclipse.jgit.transport.PushResult> |
doPush(File workspace,
String remote,
org.eclipse.jgit.transport.RefSpec spec)
See
Git.push() |
static boolean |
doRepoTest(File workspace)
Verify if workspace has git repository.
|
static org.eclipse.jgit.lib.Ref |
doReset(File workspace)
Reset repository state.
|
static org.eclipse.jgit.api.Status |
doStatus(File workspace)
See
Git.status() |
static org.eclipse.jgit.lib.Ref |
findRef(File workspace,
String name)
Find reference in repository.
|
static boolean |
isSuccess(org.eclipse.jgit.api.CheckoutResult.Status checkoutStatus) |
static boolean |
isSuccess(org.eclipse.jgit.transport.RemoteRefUpdate.Status pushStatus) |
static String |
ref(boolean fast,
String localBranchName,
String remoteBranchName)
Source:Target branch reference for push.
|
static String |
ref(boolean fast,
String remoteBranchName,
String remoteName,
String remoteTrackingBranchName)
Source:Target branch reference for fetch.
|
static org.eclipse.jgit.transport.RefSpec |
refFetch(String remoteBranchName,
String remoteName,
String remoteTrackingBranchName)
Source:Target branch reference for fetch with fast-forward.
|
static String |
refHeads(String branchName)
Head branch reference.
|
static org.eclipse.jgit.transport.RefSpec |
refPush(String localBranchName,
String remoteBranchName)
Source:Target branch reference for push w/o fast-forward.
|
static String |
refRemotes(String remoteName,
String remoteBranchName)
Local remote tracking branch reference.
|
static String |
remote(String remoteName,
String remoteBranch) |
public static org.eclipse.jgit.dircache.DirCache doAdd(File workspace, String pattern)
Git.add()
public static org.eclipse.jgit.api.CheckoutResult doCheckout(File workspace, String localBranch, String remoteName, String remoteBranch)
Git.checkout()
public static org.eclipse.jgit.api.Git doClone(File workspace, String uri, String remote)
public static org.eclipse.jgit.revwalk.RevCommit doCommit(File workspace, org.eclipse.jgit.lib.PersonIdent person, String message)
Git.commit()
public static org.eclipse.jgit.transport.FetchResult doFetch(File workspace, String remote, org.eclipse.jgit.transport.RefSpec spec)
Git.fetch()
public static org.eclipse.jgit.api.MergeResult doMerge(File workspace, org.eclipse.jgit.lib.ObjectId commit)
Git.merge()
public static org.eclipse.jgit.api.PullResult doPull(File workspace)
Git.pull()
public static Iterable<org.eclipse.jgit.transport.PushResult> doPush(File workspace, String remote, org.eclipse.jgit.transport.RefSpec spec)
Git.push()
public static boolean doRepoTest(File workspace)
public static org.eclipse.jgit.lib.Ref doReset(File workspace)
public static org.eclipse.jgit.api.Status doStatus(File workspace)
Git.status()
public static org.eclipse.jgit.lib.Ref findRef(File workspace, String name)
public static boolean isSuccess(org.eclipse.jgit.api.CheckoutResult.Status checkoutStatus)
public static boolean isSuccess(org.eclipse.jgit.transport.RemoteRefUpdate.Status pushStatus)
public static String ref(boolean fast, String localBranchName, String remoteBranchName)
Example: refs/heads/master:refs/heads/master
public static String ref(boolean fast, String remoteBranchName, String remoteName, String remoteTrackingBranchName)
Example: refs/heads/master:refs/remotes/origin/master
public static org.eclipse.jgit.transport.RefSpec refFetch(String remoteBranchName, String remoteName, String remoteTrackingBranchName)
Example: +refs/heads/master:refs/remotes/origin/master
public static String refHeads(String branchName)
Example: refs/heads/master
public static org.eclipse.jgit.transport.RefSpec refPush(String localBranchName, String remoteBranchName)
Example: refs/heads/master:refs/heads/master
public static String refRemotes(String remoteName, String remoteBranchName)
Example: refs/remotes/origin/master
Copyright © 2004-2013 Barchart, Inc.. All Rights Reserved.