Created
June 22, 2016 07:36
-
-
Save jmarmolejos/2b21a128655c969b1db4a137d13800d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Some stuff I started prototyping at work but then had to switch to more 'important' things | |
| var child_process = require('child_process'); | |
| child_process.exec('git log --decorate --oneline --stat=99999', (err, stdout, stderr) => { | |
| var masterLineStart = "origin/master, origin/HEAD, master"; | |
| var lines = stdout.split("\n"); | |
| var lineAtMasterIndex = lines.findIndex(function(line){ | |
| return line.indexOf(masterLineStart) >= 0 | |
| }) | |
| console.log(lines[lineAtMasterIndex]) | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment