Skip to content
Snippets Groups Projects
  1. Apr 16, 2013
    • Ben Boeckel's avatar
      commit-msg: Remove MERGE_HEAD check from msg_is_merge · 11679f83
      Ben Boeckel authored and Brad King's avatar Brad King committed
      When using "git commit --amend" to edit a merge commit message the
      MERGE_HEAD is long gone.  Also, some Git versions remove this file
      before the commit-msg hook is called.  In either case we should still
      allow long summary lines that start in 'Merge ' just as we do for
      'Revert '.
      11679f83
  2. Apr 04, 2013
  3. Oct 10, 2012
    • Chuck Atkins's avatar
      Make all hook references relative to thier location · 646b891d
      Chuck Atkins authored and Brad King's avatar Brad King committed
      Some hooks were getting referenced directly via $GIT_DIR/hooks while at
      other times getting referenced relative via ${BASH_SOURCE%/*}.  By making
      all references relative then these hooks can reside in a different folder
      and still be daisy-chained by other hooks.
      646b891d
  4. Feb 29, 2012
    • Brad King's avatar
      Set GIT_DIR if not already set · 5ebbe2da
      Brad King authored
      Although it seems reasonable to expect GIT_DIR to be set when
      hooks are invoked, the "git help hooks" documentation does not
      guarantee it.  On msysGit 1.7.8 (and perhaps others) "git gui"
      runs prepare-commit-msg without setting GIT_DIR.  Set GIT_DIR
      at the beginning of each commit hook if it is not already set.
      5ebbe2da
  5. Oct 06, 2011
    • Brad King's avatar
      Load local hooks configuration from work tree · 18358af3
      Brad King authored
      Look for a ".hooks-config.bash" file at the top of the work tree.
      Load it in each hook to get per-project configuration.  Currently
      we do not define any config options, but this adds the framework.
      18358af3
  6. Jan 13, 2011
  7. Jan 11, 2011
  8. Dec 30, 2010
  9. Nov 17, 2010
  10. Nov 16, 2010
    • Brad King's avatar
      Chain to script configured by "hooks.chain-<hook>" · dc31be5b
      Brad King authored
      Chain the pre-commit, commit-msg, and prepare-commit-msg hooks to
      locally configured scripts.  Interpret relative paths with respect to
      the working directory where the hooks run (top of work tree).  This
      allows project setup scripts to add project-specific checks for each of
      these hooks.
      dc31be5b
  11. Sep 14, 2010
  12. Aug 31, 2010
  13. Aug 30, 2010
  14. Aug 27, 2010
  15. Aug 03, 2010
    • Gaëtan Lehmann's avatar
      Reference bash explicitly in shebang lines · 8653d286
      Gaëtan Lehmann authored and Brad King's avatar Brad King committed
      On Solaris, where /bin/sh is actually sh, not bash, some expressions
      like $() are not supported.  Git's own scripts on this machine are
      configured to use "#!/bin/bash".  Change our shebang line to
      
        #!/usr/bin/env bash
      
      which should work almost everywhere.
      8653d286
  16. Jun 16, 2010
  17. Apr 28, 2010
    • Brad King's avatar
      commit-msg: Exclude diff during "git commit -v" · 7cd62382
      Brad King authored
      Stop processing the commit message text at a "diff --git" line.  Such
      lines occur when the user commits with the "-v" option.  We should not
      check the patch content; it will be stripped by Git anyway.
      7cd62382
  18. Apr 22, 2010
  19. Mar 31, 2010
Loading