Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

git-log-utils

littlebee14MIT0.4.1

Utility methods for parsing git log output

git, log

readme

git-log-utils

Utility methods for parsing git log output

Installation

  npm install git-log-utils

Usage


GitLogUtils = require('git-log-utils')

GitLogUtils.getFileCommitHistory(fileName)

Returns an array of javascript objects representing the commits that effected the requested file with line stats, that looks like this:

[{
  "id": "1c41d8f647f7ad30749edcd0a554bd94e301c651",
  "authorName": "Bee Wilkerson",
  "relativeDate": "6 days ago",
  "authorDate": 1450881433,
  "message": "docs all work again after refactoring to bumble-build",
  "body": "",
  "hash": "1c41d8f",
  "linesAdded": 2,
  "linesDeleted": 2
}, {
  ...
}]

changelog

0.4.0 - (2018-12-03)

Other Commits

0.3.0 - (2018-09-16)

Now returns files effected for each commit!

For single file queries, getCommitHistory will always return s single file in the files attribute that being the file requested. For directory queries, files will contain only the files in the directory which were involved in the commit.

Other Commits

  • d3112c5 improve parsing of git log output; add files effected to commit objects returned
  • ffbeb0e add - to escaped characters
  • 003d9f3 adds missing development deps

0.2.2 (2016-04-93)

Bugs Fixed in this Release

  • 72930e5 (unreported) parens in file name cause error. better escaping for cli.

0.2.1 (2016-03-89)

Other Commits

  • c7dc6eb fixes git-time-machine:issue#30. should handle spaces in directory and file names and properly escape and normalize file for windows

0.2.0 (2016-03-87)

Thank you @Faleij the critical windows fix. Did I ever tell you, you're my hero. :)

New Features

Other Commits

0.1.6 (2016-03-79)

remove accidental console.log left behind

0.1.5 (2016-03-78)

Bugs Fixed in this Release

  • 899e63c fix for path errors on windows surfacing in git-time-machine see issue 22 in that repo