readTag
Read an annotated tag object directly
| param | type [= default] | description |
|---|---|---|
| fs | FsClient | a file system client |
| dir | string | The working tree directory path |
| gitdir | string = join(dir,'.git') | The git directory path |
| oid | string | The SHA-1 object id to get |
| cache | object | a cache object |
| return | Promise<ReadTagResult> | Resolves successfully with a git object description |
The object returned has the following schema:
type ReadTagResult = {
oid: string; // SHA-1 object id of this tag
tag: TagObject; // the parsed tag object
payload: string; // PGP signing payload
}
A git annotated tag object.
type TagObject = {
object: string; // SHA-1 object id of object being tagged
type: 'blob' | 'tree' | 'commit' | 'tag'; // the type of the object being tagged
tag: string; // the tag name
tagger: {
name: string; // the tagger's name
email: string; // the tagger's email
timestamp: number; // UTC Unix timestamp in seconds
timezoneOffset: number; // timezone difference from UTC in minutes
};
message: string; // tag message
gpgsig?: string; // PGP signature (if present)
}
Tip: If you need a clean slate, expand and run this snippet to clean up the file system.
window.fs = new LightningFS('fs', { wipe: true })
window.pfs = window.fs.promises
console.log('done')