|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gitective.core.RepositoryUtils
public abstract class RepositoryUtils
Utilities for dealing with Git repositories.
This class provides helpers for getting the branches, tags, and note references in a repository.
This class also provides helpers for knowing which references differ between a local and remote repository.
| Nested Class Summary | |
|---|---|
static class |
RepositoryUtils.RefDiff
Wrapper class for a remote and local ref that are different |
| Constructor Summary | |
|---|---|
RepositoryUtils()
|
|
| Method Summary | |
|---|---|
static Collection<RepositoryUtils.RefDiff> |
diffOriginRefs(org.eclipse.jgit.lib.Repository repository)
List the origin remote references and return all remote references that are missing locally or have a different remote object id than the local reference. |
static Collection<RepositoryUtils.RefDiff> |
diffRemoteRefs(org.eclipse.jgit.lib.Repository repository,
String remote)
List remote references and return all remote references that are missing locally or have a different remote object id than the local reference. |
static Collection<String> |
getBranches(org.eclipse.jgit.lib.Repository repository)
Get all the local and remote tracking branch references in the given repository. |
static Collection<String> |
getNoteRefs(org.eclipse.jgit.lib.Repository repository)
Get all the note references in the given repository. |
protected static Collection<org.eclipse.jgit.lib.Ref> |
getRefs(org.eclipse.jgit.lib.Repository repository,
String prefix)
Get the refs with prefix in repository |
static Collection<String> |
getTags(org.eclipse.jgit.lib.Repository repository)
Get all the tag references in the given repository. |
protected static boolean |
hasRemote(org.eclipse.jgit.lib.Repository repository,
String remote)
Does the given remote exist in the repository? |
static Map<String,Set<String>> |
mapEmailsToNames(Collection<org.eclipse.jgit.lib.PersonIdent> persons)
Map e-mail addresses to names for all given PersonIdent instances |
static Map<String,Set<String>> |
mapNamesToEmails(Collection<org.eclipse.jgit.lib.PersonIdent> persons)
Map names to e-mail addresses for all given PersonIdent instances |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RepositoryUtils()
| Method Detail |
|---|
protected static Collection<org.eclipse.jgit.lib.Ref> getRefs(org.eclipse.jgit.lib.Repository repository,
String prefix)
repository - prefix -
public static Collection<String> getNoteRefs(org.eclipse.jgit.lib.Repository repository)
repository -
public static Collection<String> getBranches(org.eclipse.jgit.lib.Repository repository)
repository -
public static Collection<String> getTags(org.eclipse.jgit.lib.Repository repository)
repository -
public static Collection<RepositoryUtils.RefDiff> diffOriginRefs(org.eclipse.jgit.lib.Repository repository)
repository -
RepositoryUtils.RefDiff
protected static boolean hasRemote(org.eclipse.jgit.lib.Repository repository,
String remote)
throws URISyntaxException
repository - remote -
URISyntaxException
public static Collection<RepositoryUtils.RefDiff> diffRemoteRefs(org.eclipse.jgit.lib.Repository repository,
String remote)
repository - remote -
RepositoryUtils.RefDiffpublic static Map<String,Set<String>> mapNamesToEmails(Collection<org.eclipse.jgit.lib.PersonIdent> persons)
PersonIdent instances
PersonIdent entries with a null or empty name will be ignored.
persons -
PersonIdent.getName(),
PersonIdent.getEmailAddress()public static Map<String,Set<String>> mapEmailsToNames(Collection<org.eclipse.jgit.lib.PersonIdent> persons)
PersonIdent instances
PersonIdent entries with a null or empty e-mail address will be
ignored.
persons -
PersonIdent.getName(),
PersonIdent.getEmailAddress()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||