Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 1x 1x 1x 1x 1x 3x 3x 3x 3x 1x 2x 2x 18x 1x 1x 1x | 'use strict';
const hooks = require('./hooks');
const hookScript = require('./hook-script');
const { findHooksDir, isSetupRequired } = require('./utils');
const debug = require('debug')('gint:setup');
module.exports = (gintDir, logger) => {
const hooksDir = findHooksDir(gintDir);
debug('Unsyncing...');
debug('%O', { hooksDir, gintDir });
if (!isSetupRequired(gintDir)) {
return false;
}
logger('Uninstalling GIT hooks');
if (hooksDir) {
hooks.forEach((hookName) => hookScript.unsync(gintDir, hooksDir, hookName));
return true;
}
logger('gint > Cannot find .git directory, skipping Git hooks un-installation');
return false;
};
|