lib/git-hooks-debug.js
function (filename, arg, callback) {
      console.log('*** git-hooks.js run', filename, arg);
        var hookName = path.basename(filename);
        var hooksDirname = path.resolve(path.dirname(filename), '../../.githooks', hookName);

        if (fsHelpers.exists(hooksDirname)) {
            var list = fs.readdirSync(hooksDirname);
            var hooks = list.map(function (hookName) {
                return path.resolve(hooksDirname, hookName);
            });
            excludeIgnoredPaths(hooks, function (filteredHooks) {
                runHooks(filteredHooks, [arg], callback);
            });
        } else {
            callback(0);
        }
    }
function (filename, arg, callback) {
      console.log('*** git-hooks.js run', filename, arg);
        var hookName = path.basename(filename);
        var hooksDirname = path.resolve(path.dirname(filename), '../../.githooks', hookName);

        if (fsHelpers.exists(hooksDirname)) {
            var list = fs.readdirSync(hooksDirname);
            var hooks = list.map(function (hookName) {
                return path.resolve(hooksDirname, hookName);
            });
            excludeIgnoredPaths(hooks, function (filteredHooks) {
                runHooks(filteredHooks, [arg], callback);
            });
        } else {
            callback(0);
        }
    }
function ( filename , arg , callback ) { console . log ( '*** git-hooks.js run' , filename , arg ) ; var hookName = path . basename ( filename ) ; var hooksDirname = path . resolve ( path . dirname ( filename ) , '../../.githooks' , hookName ) ; if ( fsHelpers . exists ( hooksDirname ) ) { var list = fs . readdirSync ( hooksDirname ) ; var hooks = list . map ( function ( hookName ) { return path . resolve ( hooksDirname , hookName ) ; } ) ; excludeIgnoredPaths ( hooks , function ( filteredHooks ) { runHooks ( filteredHooks , [ arg ] , callback ) ; } ) ; } else { callback ( 0 ) ; } }
Runs a git hook.

@param {String} filename Path to git hook.
@param {String} [arg] Git hook argument.
@param {Function} callback
Runs a git hook .