Package adams.core.git
Class GitHelper
- java.lang.Object
-
- adams.core.git.GitHelper
-
public class GitHelper extends Object
Helper class for git.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static String
FORMAT_REVCOMMIT_LONG
static String
FORMAT_REVCOMMIT_SHORT
static String
PH_COMMITTER
static String
PH_FULL_MESSAGE
static String
PH_HASH
static String
PH_SHORT_MESSAGE
static String
PH_TIMESTAMP
-
Constructor Summary
Constructors Constructor Description GitHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
format(org.eclipse.jgit.api.MergeResult merge)
Formats a merge result.static String
format(org.eclipse.jgit.api.PullResult pull)
Turns the pull result into a legible string.static String
format(org.eclipse.jgit.api.RebaseResult rebase)
Formats a rebase result.static String
format(org.eclipse.jgit.revwalk.RevCommit commit, String format)
Returns a commit as a string.static String
format(org.eclipse.jgit.transport.FetchResult fetch)
Formats a fetch result.static String
format(org.eclipse.jgit.transport.RemoteRefUpdate update)
Turns the update into a string.
-
-
-
Field Detail
-
PH_TIMESTAMP
public static final String PH_TIMESTAMP
- See Also:
- Constant Field Values
-
PH_COMMITTER
public static final String PH_COMMITTER
- See Also:
- Constant Field Values
-
PH_HASH
public static final String PH_HASH
- See Also:
- Constant Field Values
-
PH_FULL_MESSAGE
public static final String PH_FULL_MESSAGE
- See Also:
- Constant Field Values
-
PH_SHORT_MESSAGE
public static final String PH_SHORT_MESSAGE
- See Also:
- Constant Field Values
-
FORMAT_REVCOMMIT_LONG
public static final String FORMAT_REVCOMMIT_LONG
- See Also:
- Constant Field Values
-
FORMAT_REVCOMMIT_SHORT
public static final String FORMAT_REVCOMMIT_SHORT
- See Also:
- Constant Field Values
-
-
Method Detail
-
format
public static String format(org.eclipse.jgit.revwalk.RevCommit commit, String format)
Returns a commit as a string.
Supported placeholders:PH_HASH
,PH_COMMITTER
,PH_FULL_MESSAGE
,PH_SHORT_MESSAGE
,PH_TIMESTAMP
- Parameters:
commit
- the commit to formatformat
- the format to use- Returns:
- the formatted string
-
format
public static String format(org.eclipse.jgit.transport.RemoteRefUpdate update)
Turns the update into a string.- Parameters:
update
- the update to format- Returns:
- the generated string
-
format
public static String format(org.eclipse.jgit.transport.FetchResult fetch)
Formats a fetch result.- Parameters:
fetch
- the result to format- Returns:
- the generated string
-
format
public static String format(org.eclipse.jgit.api.MergeResult merge)
Formats a merge result.- Parameters:
merge
- the result to format- Returns:
- the generated string
-
format
public static String format(org.eclipse.jgit.api.RebaseResult rebase)
Formats a rebase result.- Parameters:
rebase
- the result to format- Returns:
- the generated string
-
format
public static String format(org.eclipse.jgit.api.PullResult pull)
Turns the pull result into a legible string.- Parameters:
pull
- the result to format- Returns:
- the generated string
-
-