prepare-commit-msg.hook 392 B

12345678910
  1. #!/bin/sh
  2. # Auto sign all commits to allow them to be used by the Docker project.
  3. # see https://github.com/dotcloud/docker/blob/master/CONTRIBUTING.md#sign-your-work
  4. #
  5. GH_USER=$(git config --get github.user)
  6. SOB=$(git var GIT_AUTHOR_IDENT | sed -n "s/^\(.*>\).*$/Docker-DCO-1.1-Signed-off-by: \1 \(github: $GH_USER\)/p")
  7. grep -qs "^$SOB" "$1" || {
  8. echo
  9. echo "$SOB"
  10. } >> "$1"