Skip to content

Commit 3bb5154

Browse files
authored
Merge pull request #38 from courajs/patch-1
Document `lastTag` and `commitsSinceLastTag`
2 parents 0753935 + 826331d commit 3bb5154

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,19 @@ var getRepoInfo = require('git-repo-info');
99

1010
var info = getRepoInfo();
1111

12-
info.branch //=> will be the current branch
13-
info.sha //=> will be the current sha
14-
info.abbreviatedSha //=> will be the first 10 chars of the current sha
15-
info.tag //=> will be the tag for the current sha (or `null` if no tag exists)
16-
info.committer //=> will be the committer for the current sha
17-
info.committerDate //=> will be the commit date for the current sha
18-
info.author //=> will be the author for the current sha
19-
info.authorDate //=> will be the authored date for the current sha
20-
info.commitMessage //=> will be the commit message for the current sha
12+
info.branch // current branch
13+
info.sha // current sha
14+
info.abbreviatedSha // first 10 chars of the current sha
15+
info.tag // tag for the current sha (or `null` if no tag exists)
16+
info.lastTag // tag for the closest tagged ancestor
17+
// (or `null` if no ancestor is tagged)
18+
info.commitsSinceLastTag // number of commits since the closest tagged ancestor
19+
// (`0` if this commit is tagged, or `Infinity` if no ancestor is tagged)
20+
info.committer           // committer for the current sha
21+
info.committerDate // commit date for the current sha
22+
info.author // author for the current sha
23+
info.authorDate // authored date for the current sha
24+
info.commitMessage // commit message for the current sha
2125
```
2226

2327
When called without any arguments, `git-repo-info` will automatically lookup upwards

0 commit comments

Comments
 (0)