Command to find human-readable names of revisions.
- Since:
- 3.0
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.jgit.api.GitCommand
repo
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
NameRevCommand
(Repository repo) Create a new name-rev command. -
Method Summary
Modifier and TypeMethodDescriptionAdd multiple objects to search for.Add an object to search for.Add all annotated tags underrefs/tags/
to the set that all results must match.Add a ref prefix to the set that results must match.Add a ref to the set that all results must match.call()
Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
-
Constructor Details
-
NameRevCommand
Create a new name-rev command.- Parameters:
repo
- theRepository
-
-
Method Details
-
call
Description copied from class:GitCommand
Execute the command
-
add
Add an object to search for.- Parameters:
id
- object ID to add.- Returns:
this
- Throws:
MissingObjectException
- the object supplied is not available from the object database.JGitInternalException
- a low-level exception of JGit has occurred. The original exception can be retrieved by callingThrowable.getCause()
.
-
add
public NameRevCommand add(Iterable<ObjectId> ids) throws MissingObjectException, JGitInternalException Add multiple objects to search for.- Parameters:
ids
- object IDs to add.- Returns:
this
- Throws:
MissingObjectException
- the object supplied is not available from the object database.JGitInternalException
- a low-level exception of JGit has occurred. The original exception can be retrieved by callingThrowable.getCause()
.
-
addPrefix
Add a ref prefix to the set that results must match.If an object matches multiple refs equally well, the first matching ref added with
addRef(Ref)
is preferred, or else the first matching prefix added byaddPrefix(String)
.- Parameters:
prefix
- prefix to add; the prefix must end with a slash- Returns:
this
-
addAnnotatedTags
Add all annotated tags underrefs/tags/
to the set that all results must match.Calls
addRef(Ref)
; see that method for a note on matching priority.- Returns:
this
- Throws:
JGitInternalException
- a low-level exception of JGit has occurred. The original exception can be retrieved by callingThrowable.getCause()
.
-
addRef
Add a ref to the set that all results must match.If an object matches multiple refs equally well, the first matching ref added with
addRef(Ref)
is preferred, or else the first matching prefix added byaddPrefix(String)
.- Parameters:
ref
- ref to add.- Returns:
this
-