lib/githooks.js
function() {

    var hookPath = path.resolve(this.options.dest, this.hookName);

    var existingCode = this.getHookContent(hookPath);

    if (existingCode) {
      this.validateScriptLanguage(existingCode);
    }

    var hookContent;
    if(this.hasMarkers(existingCode)) {
      hookContent = this.insertBindingCode(existingCode);
    } else {
      hookContent = this.appendBindingCode(existingCode);
    }

    fs.writeFileSync(hookPath, hookContent);

    fs.chmodSync(hookPath, '755');
  }
function() {

    var hookPath = path.resolve(this.options.dest, this.hookName);

    var existingCode = this.getHookContent(hookPath);

    if (existingCode) {
      this.validateScriptLanguage(existingCode);
    }

    var hookContent;
    if(this.hasMarkers(existingCode)) {
      hookContent = this.insertBindingCode(existingCode);
    } else {
      hookContent = this.appendBindingCode(existingCode);
    }

    fs.writeFileSync(hookPath, hookContent);

    fs.chmodSync(hookPath, '755');
  }
function ( ) { var hookPath = path . resolve ( this . options . dest , this . hookName ) ; var existingCode = this . getHookContent ( hookPath ) ; if ( existingCode ) { this . validateScriptLanguage ( existingCode ) ; } var hookContent ; if ( this . hasMarkers ( existingCode ) ) { hookContent = this . insertBindingCode ( existingCode ) ; } else { hookContent = this . appendBindingCode ( existingCode ) ; } fs . writeFileSync ( hookPath , hookContent ) ; fs . chmodSync ( hookPath , '755' ) ; }
Creates the hook
@method create
Creates the hook