is-merge-commit
v1.0.1
Published
A tool to check if files are added in a git repository
Downloads
6
Readme
is-merge-commit
Get synchronously the current branch name
Installation
$ npm i is-merge-commit --save
or
$ yarn add is-merge-commit
Usage
isMergeCommit(commit[, options])
Parameters:
- commit
<String>
: The git commit identifier - options
<Object>
(optional)
Options:
- cwd
<String>
: Current working directory for the git execution
Returns:
- Boolean: Wether it is a merge commit or not
const isMergeCommit = require('is-merge-commit');
isMergeCommit('8bc8ea6'); // true | false
isMergeCommit('8bc8ea6', { cwd: 'any/git/repo' }); // true | false
LICENSE
MIT © Jan Peer Stöcklmair