git-name-rev

0.1.0 • Public • Published

git-name-rev

Find symbolic names for given revs by shelling out to Git (namely git-name-rev(1)).

Usage

var gitNameRev = require('git-name-rev');
var path = require('path');
var repoPath = path.resolve(process.env.REPO || (__dirname + '/.git'));
var rev = process.env.REV;

if (!rev) { throw new Error('rev missing'); }

gitNameRev(repoPath, rev, function(err, name) {
  if (err) { throw err; }

  console.log('name is %s.', name);
});

Tests

npm test

License

MIT

Package Sidebar

Install

npm i git-name-rev

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • alessioalex