Examples (git is a org. instance):
Create a new tag for the current commit:
git.tag().setName("v1.0").setMessage("First stable release").call();
Create a new unannotated tag for the current commit:
git.tag().setName("v1.0").setAnnotated(false).call();
| Modifier and Type | Field and Description |
|---|---|
| private Boolean | |
| private CredentialsProvider | |
| private boolean | |
| private GpgConfig | |
| private RevObject | |
| private String | |
| private String | |
| private Boolean | |
| private Signer | |
| private String | |
| private PersonIdent |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public Ref | call()
Implements abstract org. Implements java. Computes a result, or throws an exception if unable to do so. |
| public String | |
| public String | |
| public RevObject | |
| public String | |
| public PersonIdent | |
| public boolean | Returns: true if this command will create an annotated tag (default is true)Whether this will create an annotated tag. |
| public boolean | |
| public boolean | Returns: whether the tag is signedWhether |
| private void | |
| public TagCommand | Returns: thiswhether this shall be an annotated tag annotated)Configure this tag to be created as an annotated tag |
| public TagCommand | Returns: thisthe provider to use when querying for credentials (eg., during
signing) credentialsProvider)Sets a |
| public TagCommand | Returns: thiswhether this is a forced update forceUpdate)If set to true the Tag command may replace an existing tag object. |
| public TagCommand | Returns: thisto set; if config)null, the config will be loaded from the
git config of the repositorySets an external |
| public TagCommand | |
| public TagCommand | |
| public TagCommand | Returns: thisa id)org. object.Sets the object id of the tag. |
| public TagCommand | Returns: thiswhether to sign signed)If set to true the Tag command creates a signed tag object. |
| public TagCommand | |
| public TagCommand | |
| public TagCommand | Returns: thisa tagger)org. object.Sets the tagger of the tag. |
| private Ref |
| annotated | back to summary |
|---|---|
| private Boolean annotated | |
| credentialsProvider | back to summary |
|---|---|
| private CredentialsProvider credentialsProvider | |
| forceUpdate | back to summary |
|---|---|
| private boolean forceUpdate | |
| gpgConfig | back to summary |
|---|---|
| private GpgConfig gpgConfig | |
| id | back to summary |
|---|---|
| private RevObject id | |
| message | back to summary |
|---|---|
| private String message | |
| name | back to summary |
|---|---|
| private String name | |
| signed | back to summary |
|---|---|
| private Boolean signed | |
| signer | back to summary |
|---|---|
| private Signer signer | |
| signingKey | back to summary |
|---|---|
| private String signingKey | |
| tagger | back to summary |
|---|---|
| private PersonIdent tagger | |
| TagCommand | back to summary |
|---|---|
| protected TagCommand(Repository repo) Constructor for TagCommand.
| |
| call | back to summary |
|---|---|
| public Ref call() throws GitAPIException, ConcurrentRefUpdateException, InvalidTagNameException, NoHeadException Implements abstract org. Implements java. Doc from org. Computes a result, or throws an exception if unable to do so. Execute the command
Executes the
| |
| getMessage | back to summary |
|---|---|
| public String getMessage() Get the tag
| |
| getName | back to summary |
|---|---|
| public String getName() Get the tag
| |
| getObjectId | back to summary |
|---|---|
| public RevObject getObjectId() Get the tag's object id
| |
| getSigningKey | back to summary |
|---|---|
| public String getSigningKey() Retrieves the signing key ID.
| |
| getTagger | back to summary |
|---|---|
| public PersonIdent getTagger() Get the
| |
| isAnnotated | back to summary |
|---|---|
| public boolean isAnnotated() Whether this will create an annotated tag.
| |
| isForceUpdate | back to summary |
|---|---|
| public boolean isForceUpdate() Whether this is a forced update
| |
| isSigned | back to summary |
|---|---|
| public boolean isSigned() Whether
| |
| processOptions | back to summary |
|---|---|
| private void processOptions() throws InvalidTagNameException, UnsupportedSigningFormatException Sets default values for not explicitly specified options. Then validates that all required data has been provided.
| |
| setAnnotated | back to summary |
|---|---|
| public TagCommand setAnnotated(boolean annotated) Configure this tag to be created as an annotated tag
| |
| setCredentialsProvider | back to summary |
|---|---|
| public TagCommand setCredentialsProvider(CredentialsProvider credentialsProvider) Sets a
| |
| setForceUpdate | back to summary |
|---|---|
| public TagCommand setForceUpdate(boolean forceUpdate) If set to true the Tag command may replace an existing tag object. This corresponds to the parameter -f on the command line.
| |
| setGpgConfig | back to summary |
|---|---|
| public TagCommand setGpgConfig(GpgConfig config) Sets an external
| |
| setMessage | back to summary |
|---|---|
| public TagCommand setMessage(String message) Set the tag
| |
| setName | back to summary |
|---|---|
| public TagCommand setName(String name) Set the tag
| |
| setObjectId | back to summary |
|---|---|
| public TagCommand setObjectId(RevObject id) Sets the object id of the tag. If the object id is
| |
| setSigned | back to summary |
|---|---|
| public TagCommand setSigned(boolean signed) If set to true the Tag command creates a signed tag object. This corresponds to the parameter -s (--sign or --no-sign) on the command line.
If
| |
| setSigner | back to summary |
|---|---|
| public TagCommand setSigner(Signer signer) Sets the
| |
| setSigningKey | back to summary |
|---|---|
| public TagCommand setSigningKey(String signingKey) Sets the signing key.
Per spec of
Note, if none was set or
If set to a non-
| |
| setTagger | back to summary |
|---|---|
| public TagCommand setTagger(PersonIdent tagger) Sets the tagger of the tag. If the tagger is null, a PersonIdent will be created from the info in the repository.
| |
| updateTagRef | back to summary |
|---|---|
| private Ref updateTagRef(ObjectId tagId, RevWalk revWalk, String tagName, String newTagToString) throws IOException, ConcurrentRefUpdateException, RefAlreadyExistsException | |