public class NameRevCommand extends GitCommand<Map<ObjectId,String>>
repo
Modifier | Constructor and Description |
---|---|
protected |
NameRevCommand(Repository repo)
Create a new name-rev command.
|
Modifier and Type | Method and Description |
---|---|
NameRevCommand |
add(Iterable<ObjectId> ids)
Add multiple objects to search for.
|
NameRevCommand |
add(ObjectId id)
Add an object to search for.
|
NameRevCommand |
addAnnotatedTags()
Add all annotated tags under
refs/tags/ to the set that all
results must match. |
NameRevCommand |
addPrefix(String prefix)
Add a ref prefix to the set that results must match.
|
NameRevCommand |
addRef(Ref ref)
Add a ref to the set that all results must match.
|
Map<ObjectId,String> |
call() |
checkCallable, getRepository, setCallable
protected NameRevCommand(Repository repo)
repo
- the Repository
public Map<ObjectId,String> call() throws GitAPIException
Execute the command
public NameRevCommand add(ObjectId id) throws MissingObjectException, JGitInternalException
id
- object ID to add.this
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 calling
Throwable.getCause()
.public NameRevCommand add(Iterable<ObjectId> ids) throws MissingObjectException, JGitInternalException
ids
- object IDs to add.this
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 calling
Throwable.getCause()
.public NameRevCommand addPrefix(String prefix)
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 by addPrefix(String)
.
prefix
- prefix to add; the prefix must end with a slashthis
public NameRevCommand addAnnotatedTags()
refs/tags/
to the set that all
results must match.
Calls addRef(Ref)
; see that method for a note on matching
priority.
this
JGitInternalException
- a low-level exception of JGit has occurred. The original
exception can be retrieved by calling
Throwable.getCause()
.public NameRevCommand addRef(Ref ref)
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 by addPrefix(String)
.
ref
- ref to add.this
Copyright © 2020 Eclipse JGit Project. All rights reserved.