1. 30 Dec, 2010 2 commits
  2. 17 Nov, 2010 1 commit
    • Brad King's avatar
      commit-msg: Allow long first lines starting in "Revert " · 125100ba
      Brad King authored
      Revert commits always have longer first lines than the commit they
      revert.  Do not reject those that happen to go over the threshold.  It
      is much simpler if the "git revert" command creates the commit without
      error.
      125100ba
  3. 16 Nov, 2010 1 commit
    • 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
  4. 05 Nov, 2010 1 commit
  5. 03 Nov, 2010 1 commit
    • Gaëtan Lehmann's avatar
      make the check for KWStyle executable non blocking · b32ecce7
      Gaëtan Lehmann authored
      At this time, a contributor won't be able to commit a change if KWStyle
      is not installed on the computer. KWStyle is not a very common program,
      and so is likely to have to be installed by hand. This increase the work
      needed to be able to contribute to ITK.
      With this change a warning is displayed if KWStyle is not installed
      but the commit is not blocked.
      
      Change-Id: I0719ee5ac6e048120504bbdc4dc022043c0f0ded
      b32ecce7
  6. 27 Sep, 2010 2 commits
    • Brad King's avatar
      Merge branch 'style-checks' into hooks · c4607863
      Brad King authored
      c4607863
    • Matt McCormick's avatar
      pre-commit: Apply uncrustify and KWStyle check for modified files. · d5bb0764
      Matt McCormick authored
      uncrustify (uncrustify.sourceforge.net) is applied to changed files prior to
      commit.
      
      This feature is off by default.  To enable this behavior, set
      
        git config hooks.uncrustify true
      
      By default, the behavior of git-mergetool is used to review the changes
      uncrustify makes before they are added to the commit.  For more information on
      this behavior, see
      
        git help mergetool
      
      KWStyle is run on the changed C++ files and the commit is aborted if the files
      do not pass the test.  A file similar to the original is saved with a '*.kws'
      extension so that line numbers referenced in the error message can be examined.
      
      The test is off by default.  To enable this behavoir, set
      
        git config hooks.KWStyle true
      
      Project specific uncrustify and KWStyle configuration files are set with 'git
      config'.  For example,
      
        git config hooks.uncrustify.conf path/to/uncrustify.conf
        git config hooks.KWStyle.conf path/to/KWStyle.conf
        git config hooks.KWStyle.overwriteRulesConf path/to/overwrite.conf # optional
      
      If the appropriate values have not been set, die() is called.  An
      optional KWStyle overwrite rules file can also been configured.
      
      The files on which to run the style checks must also be identified in the
      repository's '.gitattributes'.  For example,
      
        *.h    hooks.style
        *.cpp  hooks.style
      
      Or, to only enable a subset of style hooks,
      
        *.h    hooks.style=KWStyle
        *.cpp  hooks.style=KWStyle,uncrustify
      
      Change-Id: Ia6b2d4136af3002eb0ec5d36f03c50df928917f4
      d5bb0764
  7. 15 Sep, 2010 1 commit
    • Brad King's avatar
      pre-commit: Allow submodule check to be disabled · 19f86ec1
      Brad King authored
      If hooks.submodule is 'false' disable all checks.  If an individual
      hooks.<module>.update is 'true' then accept any update for that module.
      Leave these options out of the hints printed.  Developers that know what
      they are doing will be able to find them by reading the hook source.
      19f86ec1
  8. 14 Sep, 2010 1 commit
  9. 31 Aug, 2010 1 commit
  10. 30 Aug, 2010 6 commits
  11. 27 Aug, 2010 2 commits
  12. 25 Aug, 2010 1 commit
  13. 10 Aug, 2010 1 commit
    • Brad King's avatar
      pre-commit: Check submodules staged with other changes · 48e72dd1
      Brad King authored
      Since Git does not automatically update submodule checkouts when
      checking out a new version in the work tree, it is common to have
      locally modified submodule references.  Therefore it is easy to stage
      such modifications with other changes by accident, especially with
      commands like "git add -u" or "git commit -a".  The result is almost
      always wrong if the submodule change is not intended.
      
      Prevent such mistakes by requiring an extra step to commit submodule
      link updates with other changes.  When this case is detected, print a
      message describing the situation and provide cut-and-paste instructions
      to proceed.
      48e72dd1
  14. 03 Aug, 2010 1 commit
    • Gaëtan Lehmann's avatar
      Reference bash explicitly in shebang lines · 8653d286
      Gaëtan Lehmann authored
      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
  15. 16 Jun, 2010 1 commit
  16. 07 Jun, 2010 3 commits
  17. 20 May, 2010 1 commit
    • Brad King's avatar
      pre-commit: Check file modes · 7827726e
      Brad King authored
      Check new files and files whose mode changes to verify that each file
      mode matches the content of the file.  The mode of a file must be
      executable if and only if the file looks executable (name ends in a
      Windows executable extension or content starts with a shebang line).
      7827726e
  18. 28 Apr, 2010 1 commit
    • 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
  19. 27 Apr, 2010 1 commit
    • Brad King's avatar
      pre-commit: Workaround shell syntax limitations · 0df83855
      Brad King authored
      Commit "Reject leading TABs" added use of shell syntax of the form
      
        $(case "..." in
           a) ... ;;
          esac)
      
      Some shell implementations fail to recognize that the ')' in the case
      label is not the end of the '$(' expression.  Work around the problem
      by moving the case block into a separate function outside the '$()'
      expression.
      0df83855
  20. 23 Apr, 2010 1 commit
  21. 22 Apr, 2010 1 commit
  22. 20 Apr, 2010 1 commit
  23. 01 Apr, 2010 1 commit
  24. 31 Mar, 2010 1 commit