githooks.js
function(hook, rules) {
			if (cfg.AVAILABLE_HOOKS.indexOf(hook) < 0 && !this.ignore) {
				this.error('hook "' + hook + '" not support');
			}

			if (!hooks[hook]) {
				hooks[hook] = new Githook(rules);
			}
			return hooks[hook];
		}
function(hook, rules) {
			if (cfg.AVAILABLE_HOOKS.indexOf(hook) < 0 && !this.ignore) {
				this.error('hook "' + hook + '" not support');
			}

			if (!hooks[hook]) {
				hooks[hook] = new Githook(rules);
			}
			return hooks[hook];
		}
function ( hook , rules ) { if ( cfg . AVAILABLE_HOOKS . indexOf ( hook ) < 0 && ! this . ignore ) { this . error ( 'hook "' + hook + '" not support' ) ; } if ( ! hooks [ hook ] ) { hooks [ hook ] = new Githook ( rules ) ; } return hooks [ hook ] ; }
add a new hook
@param  {String} hook  [hook name]
@param  {Object} rules [hook trigger rules]
@return Githook
add a new hook