git-raw-commits
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/git-raw-commits package

4.0.0 • Public • Published

NPM version Build Status: Linux Build Status: Windows Dependency Status Coverage Status

Get raw git commits out of your repository using git-log(1)

Install

$ npm install --save git-raw-commits

Usage

var gitRawCommits = require('git-raw-commits');

gitRawCommits(options)
  .pipe(...);

API

gitRawCommits(gitOpts, [execOpts])

Returns a readable stream. Stream is split to break on each commit.

gitOpts

Type: object

Please check the available options at http://git-scm.com/docs/git-log. NOTE: Single dash arguments are not supported because of https://github.com/sindresorhus/dargs/blob/master/index.js#L5.

NOTE: for <revision range> we can also use <from>..<to> pattern, and this module has the following extra options for shortcut of this pattern:

gitOpts.from

Type: string Default: ''

gitOpts.to

Type: string Default: 'HEAD'

This module also have the following additions:

gitOpts.format

Type: string Default: '%B'

Please check http://git-scm.com/docs/git-log for format options.

gitOpts.debug

Type: function

A function to get debug information.

gitOpts.path

Type: string or array

Filter commits to the path(s) provided.

execOpts

Options to pass to git childProcess

Type: object

execOpts.cwd

Type: string

Current working directory to execute git in

CLI

$ npm install --global git-raw-commits
$ git-raw-commits --help # for more details

License

MIT © Steve Mao

Dependents (439)

Package Sidebar

Install

npm i git-raw-commits

Weekly Downloads

4,775,429

Version

4.0.0

License

MIT

Unpacked Size

7.86 kB

Total Files

5

Last publish

Collaborators

  • bcoe
  • oss-bot
  • stevemao