Skip to content

Instantly share code, notes, and snippets.

View fabiobiondi's full-sized avatar

Fabio Biondi fabiobiondi

View GitHub Profile
@cef62
cef62 / git-helpers.js
Created November 15, 2016 15:15
Run npm install after post-merge hook only when package.json changes. Javascript only.
const { exec } = require('./helpers')
const changedFile = (filename, partial) => exec(
`git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD`,
`Something went wrong reading last git-pulled files list.`,
true
).then((stdout) => stdout.split('\n')
.some((name) => {
let match
if (partial) {