Merge pull request #7380 from tiborvass/merge-7368

Accept vanilla Linux Foundation signoffs (Closes 7368)
This commit is contained in:
Michael Crosby 2014-08-01 16:33:13 -07:00
commit bec676e2de
3 changed files with 8 additions and 20 deletions

View File

@ -208,18 +208,16 @@ By making a contribution to this project, I certify that:
Then you just add a line to every git commit message:
Docker-DCO-1.1-Signed-off-by: Joe Smith <joe.smith@email.com> (github: github_handle)
Signed-off-by: Joe Smith <joe.smith@email.com>
Using your real name (sorry, no pseudonyms or anonymous contributions.)
One way to automate this, is customize your git `commit.template` by adding
a `prepare-commit-msg` hook to your Docker repository:
If you set your `user.name` and `user.email` git configs, you can sign your
commit automatically with `git commit -s`.
```
curl -sSL -o .git/hooks/prepare-commit-msg https://raw.githubusercontent.com/docker/docker/master/contrib/prepare-commit-msg.hook && chmod +x .git/hooks/prepare-commit-msg
```
* Note: the above script expects to find your GitHub user name in `git config --get github.user`
Note that the old-style `Docker-DCO-1.1-Signed-off-by: ...` format is still
accepted, so there is no need to update outstanding pull requests to the new
format right away, but please do adjust your processes for future contributions.
#### Small patch exception

View File

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

View File

@ -13,8 +13,8 @@ notDocs="$(validate_diff --numstat | awk '$3 !~ /^docs\// { print $3 }')"
githubUsernameRegex='[a-zA-Z0-9][a-zA-Z0-9-]+'
# https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
dcoPrefix='Docker-DCO-1.1-Signed-off-by:'
dcoRegex="^$dcoPrefix ([^<]+) <([^<>@]+@[^<>]+)> \\(github: ($githubUsernameRegex)\\)$"
dcoPrefix='Signed-off-by:'
dcoRegex="^(Docker-DCO-1.1-)?$dcoPrefix ([^<]+) <([^<>@]+@[^<>]+)>( \\(github: ($githubUsernameRegex)\\))?$"
check_dco() {
grep -qE "$dcoRegex"