Skip to contentSkip to conversation

clarify licensing terms for .git/hooks/*.sample files

RFC In review Junio C Hamano 2 participants 3 messages Feb 7, 2022 – Feb 12, 2022

lore
Share & tools
lore
#0 lore raw

RFC 1/1 clarify licensing terms for .git/hooks/*.sample files

When a new repository is created by end-user, the template material are copied from /usr/share/git-core/templates directory, including sample hook scripts.

As the source code of Git itself is licensed under GPL-2.0, by default, these come under the same license. Some end-users may worry that this might "contaminate" their project's licensing status.

Let's add some text to clarify _our_ intention.

What is added is merely a draft for discussion. The commit references and author idents point at the right commits and people whose input matters in today's contents of each file and we'll have to contact them and have them agree what license they want to have the current contents of the file under.

I am contemplating to relicense all my work under templates/hooks--* under either MIT or BSD-3-Clause, but some sample hooks do not have my input and the choice of course will be up to their authors.

---

cf. https://lore.kernel.org/git/[email protected]/

 templates/hooks--LICENSE | 256 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 256 insertions(+)
 create mode 100644 templates/hooks--LICENSE
templates/hooks--LICENSE new file +256 -0
new file mode 100644
index 0000000000..f6834f312b
@@ -0,0 +1,256 @@
+The *.sample hook scripts installed in this repository have been
+copied from Git source code by "git init".  Because Git itself as a
+whole is licensed under the GPL-2.0 license [*1*], some people have
+raised concerns if these scripts somehow contaminate the contents
+developed by the end users and stored in their repository.
+
+While we, Git developers, are not your lawyers, we believe the
+presence of these sample hook scripts in your repository does not
+constitute "distribution" that makes the contents tracked in your
+repository governed also under the same license as ours, but it would
+be a good idea to clarify that
+
+ * We do not intend to spread the license of Git to your contents by
+   copying the sample hook scripts.
+
+ * These sample hook scripts may be under licenses other than GPL-2.0.
+
+The list below describes under which open-source license each sample
+hook script is licensed.
+
+----
+
+NEEDSWORK:
+
+Below are draft entries that do show correct commit object names that
+matter to, or contributors who write, the surviving contents of the
+file, but these people haven't been asked to do anything yet (hence
+they haven't responded yet, of course), so they do not show what the
+licensing status of these files will be at the end of this exercise
+yet.
+
+What I am hoping to achieve is to replace the text under each bullet
+point to document who the authors/copyright holders are of the file,
+and under what license the copy given to each end-user repository is
+usable by the end-user.  It would be more useful if the license chosen
+(which can be different per file) is more lenient than strict.
+
+----
+
+
+* applypatch-msg.sample
+
+    This sample hook script was written in 2005 by Junio C Hamano, who
+    hereby clarifies that the contents of these files, when used as a
+    hook script installed by "git init", or manually copied by the
+    user, is licensed under the MIT license [*2*].
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version, will be asked to
+    endorse this clarification later.
+
+    Nguyễn Thái Ngọc Duy <[email protected]>
+    b849b954d22ee069b0edec1a12c78782ae1e629d (adjust for newer Git)
+
+
+* commit-msg.sample
+
+    This sample hook script was written in 2005 by Junio C Hamano, who
+    hereby clarifies that the contents of these files, when used as a
+    hook script installed by "git init", or manually copied by the
+    user, is licensed under the MIT license [*2*].
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version will be asked to endorse
+    this clarification later.
+
+    Ben Walton <[email protected]>
+    100e762a60a691a4978434f1cd5532e19cad39fc (adjust for newer Git)
+
+    Paolo Bonzini <[email protected]>
+    8089c85bcba89464b9b2a32fa948ed85eb367e70 (advice against 59f3e254)
+
+    Luben Tuikov <[email protected]>
+    9a1ae9ab03abaffc977421f182997f3e735e7098 (make failure louder)
+
+    Andy Parkins <[email protected]>
+    59f3e254801648322b2d5cd073ca0cc5009aa2de (hint to auto-add -s)
+
+    Junio C Hamano <[email protected]>
+    89e2c5f17b901edf28a8bb778ece3f6c18bbb721 (initial version in 2005)
+
+
+* fsmonitor-watchman.sample
+
+    Alex Vandiver <[email protected]>
+    Ben Peart <[email protected]>
+    Kevin Willford <[email protected]>
+
+
+* post-update.sample
+
+    This sample hook script was written in 2005 by Junio C Hamano, who
+    hereby clarifies that the contents of these files, when used as a
+    hook script installed by "git init", or manually copied by the
+    user, is licensed under the MIT license [*2*].
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version will be asked to endorse
+    this clarification later.
+
+    Ben Walton <[email protected]>
+    100e762a60a691a4978434f1cd5532e19cad39fc (adjust for newer Git)
+
+
+* pre-applypatch.sample
+
+    This sample hook script was written in 2005 by Junio C Hamano, who
+    hereby clarifies that the contents of these files, when used as a
+    hook script installed by "git init", or manually copied by the
+    user, is licensed under the MIT license [*2*].
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version will be asked to endorse
+    this clarification later.
+
+    Nguyễn Thái Ngọc Duy <[email protected]>
+    b849b954d22ee069b0edec1a12c78782ae1e629d (adjust for newer Git)
+
+
+* pre-commit.sample
+
+    Even though the history of this file dates back to 2005, the
+    current version contains no material from commits before 03e2b630
+    (Update sample pre-commit hook to use "diff --check", 2008-06-26),
+    which was written by Junio C Hamano, who hereby clarifies that the
+    contents of these files, when used as a hook script installed by
+    "git init", or manually copied by the user, is licensed under the
+    MIT license [*2*].
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version will be asked to endorse
+    this clarification later.
+
+    Jim Meyering <[email protected]>
+    c646217e1366b0397552fad8c32acb47fbe8977d
+    f1e3156e627fa66714deea665c8f3585088b9695
+    c14daa4845ff2ec0d27807fa50f9fac1ca4d6462
+
+    Heiko Voigt <[email protected]>
+    d00e364de99d51bb76e437820e23cfa820417ec5 (non-ascii pathname check)
+
+    Björn Steinbrink <[email protected]>
+    c30eb852e281d55b04465b7814e00396893f74f3 (initial commit check)
+
+    Richard Hartmann <[email protected]>
+    27b6e17a6d84a18861f05fd7c684ab443bf15244
+
+    Johan Herland <[email protected]>
+    af1748b31eb68643f1b8d9d918f43611cf96d257
+
+    brian m. carlson <[email protected]>
+    03a7f388dafaee0aa084144efe7a8f9c151e5221
+
+    Lucius Hu <[email protected]>
+    81e3db42f3212a8e441e4ecee9a2928921cb9045
+
+
+* pre-merge-commit.sample
+
+    Michael J Gruber <[email protected]>
+    6098817fd7f64209664c701df30096dc0f4fb876
+
+* prepare-commit-msg.sample
+
+    Kaartic Sivaraam <[email protected]>
+    b22a3079466b72e8a8b76065d6c28efe7eea4b16 (clean-up)
+
+    Ben Walton <[email protected]>
+    502be959531b34e2d9283213b7bca51842639240
+    100e762a60a691a4978434f1cd5532e19cad39fc (adjust for newer Git)
+
+    Alex Riesen <[email protected]>
+    3015fa5846c19e79f99c1d6a49fd2510ed9291b8
+
+    Marcel Koeppen <[email protected]>
+    4be1fe1b944e568f47efcb9d1beb8639f50b723f
+
+    Paolo Bonzini <[email protected]>
+    8089c85bcba89464b9b2a32fa948ed85eb367e70 (initial version in 2008)
+
+* pre-push.sample
+
+    Denton Liu <[email protected]>
+    6a117da6e523a82115733682f4d3f59755897d5a
+    8c7e5059506c6840bfbd4dd8d1730784a5689719
+
+    W. Trevor King <[email protected]>
+    1a947ba3a3eebea80be6a6d1000614884807bc8b (adjust behaviour to BCP)
+
+    Aaron Schrab <[email protected]>
+    87c86dd14abe8db7d00b0df5661ef8cf147a72a3 (initial version in 2013)
+
+
+* pre-rebase.sample
+
+    This sample hook script was written in 2006 by Junio C Hamano, who
+    hereby clarifies that the contents of these files, when used as a
+    hook script installed by "git init", or manually copied by the
+    user, is licensed under the MIT license [*2*].
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version will be asked to endorse
+    this clarification later.
+
+    Ben Walton <[email protected]>
+    502be959531b34e2d9283213b7bca51842639240 (adjust for newer Git)
+    100e762a60a691a4978434f1cd5532e19cad39fc (adjust for newer Git)
+
+    Jonathan Nieder <[email protected]>
+    8db1ae57409b10ba48596198b329adba7fcb6b1a
+
+    Martin Ågren <[email protected]>
+    7560f547e614244fe1d4648598d4facf7ed33a56 (phraso)
+
+* pre-receive.sample
+
+    Stefan Beller <[email protected]>
+    77a9745d19b2b308c1ce97d18053322d1471bc4c (initial version)
+
+* push-to-checkout.sample
+
+    Adam Spiers <[email protected]>
+    e632c464d5dbbda72ae370ff6e9cbe31c01b0bb0 (initial version)
+
+* update.sample
+
+    Even though the history of this file dates back to 2006, the
+    current version contains no material from commits before a69aba6a
+    (UNIX reference time of 1970-01-01 00:00 is UTC timezone, not
+    local time zone, 2007-01-26), which was written by Andy Parkins.
+
+    Andy Parkins <[email protected]>
+    a69aba6af3e96f8021c194691a851e78febd70bf (base version)
+    829a686f1b50ba96cac2d88494fa339efe0c0862 (enhancement)
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version will be asked to endorse
+    this clarification later.
+
+    Gerrit Pape <[email protected]>
+    Alexandre Julliard <[email protected]>
+    Pavel Roskin <[email protected]>
+    John Tapsell <[email protected]>
+    Pierre Habouzit <[email protected]>
+    Heiko Voigt <[email protected]>
+    David Aguilar <[email protected]>
+    Martin Amdisen <[email protected]>
+    Lucius Hu <[email protected]>
+    Denton Liu <[email protected]>
+
+
+[References]
+
+*1* https://opensource.org/licenses/GPL-2.0
+
+*2* https://opensource.org/licenses/MIT
Signature · 1 line
2.35.1-46-g38062e73e0
#1 lore raw
Quoted 8 lines · Junio C Hamano

+----

templates/hooks--LICENSE new file +7 -0
+
+NEEDSWORK:
+
+Below are draft entries that do show correct commit object names that
+matter to, or contributors who write, the surviving contents of the
+file, but these people haven't been asked to do anything yet (hence
+they haven't responded yet, of course), so they do not show what the

templates/hooks--LICENSE line 38

Quoted 10 lines
templates/hooks--LICENSE new file +10 -0
+licensing status of these files will be at the end of this exercise
+yet.
+
+What I am hoping to achieve is to replace the text under each bullet
+point to document who the authors/copyright holders are of the file,
+and under what license the copy given to each end-user repository is
+usable by the end-user.  It would be more useful if the license chosen
+(which can be different per file) is more lenient than strict.
+
+----

In other words, what I had in the rest of this file was more like working notes for us to keep track of what we learned about the code, whom to contact, and later when we accumulate Acks, record them. The goal is to turn each of these entries into this form:

----

* pre-frotz.sample

The authors of this sample hook script have agreed to relicense this under the ABC license (https://opensource.org/licenses/ABC).

Junio C Hamano <[email protected]>
cf. https://lore.kernel.org/git/[email protected]/

A U Thor <[email protected]>
cf. ...

----

where the references will show readers the relevant record.

Thanks.

Quoted 216 lines
templates/hooks--LICENSE new file +216 -0
+* applypatch-msg.sample
+
+    This sample hook script was written in 2005 by Junio C Hamano, who
+    hereby clarifies that the contents of these files, when used as a
+    hook script installed by "git init", or manually copied by the
+    user, is licensed under the MIT license [*2*].
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version, will be asked to
+    endorse this clarification later.
+
+    Nguyễn Thái Ngọc Duy <[email protected]>
+    b849b954d22ee069b0edec1a12c78782ae1e629d (adjust for newer Git)
+
+
+* commit-msg.sample
+
+    This sample hook script was written in 2005 by Junio C Hamano, who
+    hereby clarifies that the contents of these files, when used as a
+    hook script installed by "git init", or manually copied by the
+    user, is licensed under the MIT license [*2*].
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version will be asked to endorse
+    this clarification later.
+
+    Ben Walton <[email protected]>
+    100e762a60a691a4978434f1cd5532e19cad39fc (adjust for newer Git)
+
+    Paolo Bonzini <[email protected]>
+    8089c85bcba89464b9b2a32fa948ed85eb367e70 (advice against 59f3e254)
+
+    Luben Tuikov <[email protected]>
+    9a1ae9ab03abaffc977421f182997f3e735e7098 (make failure louder)
+
+    Andy Parkins <[email protected]>
+    59f3e254801648322b2d5cd073ca0cc5009aa2de (hint to auto-add -s)
+
+    Junio C Hamano <[email protected]>
+    89e2c5f17b901edf28a8bb778ece3f6c18bbb721 (initial version in 2005)
+
+
+* fsmonitor-watchman.sample
+
+    Alex Vandiver <[email protected]>
+    Ben Peart <[email protected]>
+    Kevin Willford <[email protected]>
+
+
+* post-update.sample
+
+    This sample hook script was written in 2005 by Junio C Hamano, who
+    hereby clarifies that the contents of these files, when used as a
+    hook script installed by "git init", or manually copied by the
+    user, is licensed under the MIT license [*2*].
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version will be asked to endorse
+    this clarification later.
+
+    Ben Walton <[email protected]>
+    100e762a60a691a4978434f1cd5532e19cad39fc (adjust for newer Git)
+
+
+* pre-applypatch.sample
+
+    This sample hook script was written in 2005 by Junio C Hamano, who
+    hereby clarifies that the contents of these files, when used as a
+    hook script installed by "git init", or manually copied by the
+    user, is licensed under the MIT license [*2*].
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version will be asked to endorse
+    this clarification later.
+
+    Nguyễn Thái Ngọc Duy <[email protected]>
+    b849b954d22ee069b0edec1a12c78782ae1e629d (adjust for newer Git)
+
+
+* pre-commit.sample
+
+    Even though the history of this file dates back to 2005, the
+    current version contains no material from commits before 03e2b630
+    (Update sample pre-commit hook to use "diff --check", 2008-06-26),
+    which was written by Junio C Hamano, who hereby clarifies that the
+    contents of these files, when used as a hook script installed by
+    "git init", or manually copied by the user, is licensed under the
+    MIT license [*2*].
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version will be asked to endorse
+    this clarification later.
+
+    Jim Meyering <[email protected]>
+    c646217e1366b0397552fad8c32acb47fbe8977d
+    f1e3156e627fa66714deea665c8f3585088b9695
+    c14daa4845ff2ec0d27807fa50f9fac1ca4d6462
+
+    Heiko Voigt <[email protected]>
+    d00e364de99d51bb76e437820e23cfa820417ec5 (non-ascii pathname check)
+
+    Björn Steinbrink <[email protected]>
+    c30eb852e281d55b04465b7814e00396893f74f3 (initial commit check)
+
+    Richard Hartmann <[email protected]>
+    27b6e17a6d84a18861f05fd7c684ab443bf15244
+
+    Johan Herland <[email protected]>
+    af1748b31eb68643f1b8d9d918f43611cf96d257
+
+    brian m. carlson <[email protected]>
+    03a7f388dafaee0aa084144efe7a8f9c151e5221
+
+    Lucius Hu <[email protected]>
+    81e3db42f3212a8e441e4ecee9a2928921cb9045
+
+
+* pre-merge-commit.sample
+
+    Michael J Gruber <[email protected]>
+    6098817fd7f64209664c701df30096dc0f4fb876
+
+* prepare-commit-msg.sample
+
+    Kaartic Sivaraam <[email protected]>
+    b22a3079466b72e8a8b76065d6c28efe7eea4b16 (clean-up)
+
+    Ben Walton <[email protected]>
+    502be959531b34e2d9283213b7bca51842639240
+    100e762a60a691a4978434f1cd5532e19cad39fc (adjust for newer Git)
+
+    Alex Riesen <[email protected]>
+    3015fa5846c19e79f99c1d6a49fd2510ed9291b8
+
+    Marcel Koeppen <[email protected]>
+    4be1fe1b944e568f47efcb9d1beb8639f50b723f
+
+    Paolo Bonzini <[email protected]>
+    8089c85bcba89464b9b2a32fa948ed85eb367e70 (initial version in 2008)
+
+* pre-push.sample
+
+    Denton Liu <[email protected]>
+    6a117da6e523a82115733682f4d3f59755897d5a
+    8c7e5059506c6840bfbd4dd8d1730784a5689719
+
+    W. Trevor King <[email protected]>
+    1a947ba3a3eebea80be6a6d1000614884807bc8b (adjust behaviour to BCP)
+
+    Aaron Schrab <[email protected]>
+    87c86dd14abe8db7d00b0df5661ef8cf147a72a3 (initial version in 2013)
+
+
+* pre-rebase.sample
+
+    This sample hook script was written in 2006 by Junio C Hamano, who
+    hereby clarifies that the contents of these files, when used as a
+    hook script installed by "git init", or manually copied by the
+    user, is licensed under the MIT license [*2*].
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version will be asked to endorse
+    this clarification later.
+
+    Ben Walton <[email protected]>
+    502be959531b34e2d9283213b7bca51842639240 (adjust for newer Git)
+    100e762a60a691a4978434f1cd5532e19cad39fc (adjust for newer Git)
+
+    Jonathan Nieder <[email protected]>
+    8db1ae57409b10ba48596198b329adba7fcb6b1a
+
+    Martin Ågren <[email protected]>
+    7560f547e614244fe1d4648598d4facf7ed33a56 (phraso)
+
+* pre-receive.sample
+
+    Stefan Beller <[email protected]>
+    77a9745d19b2b308c1ce97d18053322d1471bc4c (initial version)
+
+* push-to-checkout.sample
+
+    Adam Spiers <[email protected]>
+    e632c464d5dbbda72ae370ff6e9cbe31c01b0bb0 (initial version)
+
+* update.sample
+
+    Even though the history of this file dates back to 2006, the
+    current version contains no material from commits before a69aba6a
+    (UNIX reference time of 1970-01-01 00:00 is UTC timezone, not
+    local time zone, 2007-01-26), which was written by Andy Parkins.
+
+    Andy Parkins <[email protected]>
+    a69aba6af3e96f8021c194691a851e78febd70bf (base version)
+    829a686f1b50ba96cac2d88494fa339efe0c0862 (enhancement)
+
+    The following contributors, who may have made copyrightable change
+    that still remains in the current version will be asked to endorse
+    this clarification later.
+
+    Gerrit Pape <[email protected]>
+    Alexandre Julliard <[email protected]>
+    Pavel Roskin <[email protected]>
+    John Tapsell <[email protected]>
+    Pierre Habouzit <[email protected]>
+    Heiko Voigt <[email protected]>
+    David Aguilar <[email protected]>
+    Martin Amdisen <[email protected]>
+    Lucius Hu <[email protected]>
+    Denton Liu <[email protected]>
+
+
+[References]
+
+*1* https://opensource.org/licenses/GPL-2.0
+
+*2* https://opensource.org/licenses/MIT
#2 lore raw
In reply to Junio C Hamano
Quoted 9 lines · Junio C Hamano

When a new repository is created by end-user, the template material are copied from /usr/share/git-core/templates directory, including sample hook scripts.

As the source code of Git itself is licensed under GPL-2.0, by default, these come under the same license. Some end-users may worry that this might "contaminate" their project's licensing status.

Quoted 8 lines

Let's add some text to clarify _our_ intention.

What is added is merely a draft for discussion. The commit references and author idents point at the right commits and people whose input matters in today's contents of each file and we'll have to contact them and have them agree what license they want to have the current contents of the file under.

FWIW, this does sound like a good thing to do.

Quoted 29 lines

I am contemplating to relicense all my work under templates/hooks--* under either MIT or BSD-3-Clause, but some sample hooks do not have my input and the choice of course will be up to their authors.

---

cf. https://lore.kernel.org/git/[email protected]/

  templates/hooks--LICENSE | 256 +++++++++++++++++++++++++++++++++++++++
  1 file changed, 256 insertions(+)

create mode 100644 templates/hooks--LICENSE

templates/hooks--LICENSE new file +10 -0
new file mode 100644
index 0000000000..f6834f312b
@@ -0,0 +1,256 @@
+The *.sample hook scripts installed in this repository have been
+copied from Git source code by "git init".  Because Git itself as a
+whole is licensed under the GPL-2.0 license [*1*], some people have
+raised concerns if these scripts somehow contaminate the contents
+developed by the end users and stored in their repository.
+
+While we, Git developers, are not your lawyers, we believe the
+presence of these sample hook scripts in your repository does not
+constitute "distribution" that makes the contents tracked in your
+repository governed also under the same license as ours, but it would

templates/hooks--LICENSE line 20

Quoted 10 lines
templates/hooks--LICENSE new file +10 -0
+be a good idea to clarify that
+
+ * We do not intend to spread the license of Git to your contents by
+   copying the sample hook scripts.
+
+ * These sample hook scripts may be under licenses other than GPL-2.0.
+
+The list below describes under which open-source license each sample
+hook script is licensed.
+

The above seems to read well to me.

Quoted 17 lines
templates/hooks--LICENSE new file +17 -0
+----
+
+NEEDSWORK:
+
+Below are draft entries that do show correct commit object names that
+matter to, or contributors who write, the surviving contents of the
+file, but these people haven't been asked to do anything yet (hence
+they haven't responded yet, of course), so they do not show what the
+licensing status of these files will be at the end of this exercise
+yet.
+
+What I am hoping to achieve is to replace the text under each bullet
+point to document who the authors/copyright holders are of the file,
+and under what license the copy given to each end-user repository is
+usable by the end-user.  It would be more useful if the license chosen
+(which can be different per file) is more lenient than strict.
+

templates/hooks--LICENSE line 42

Quoted 10 lines
templates/hooks--LICENSE new file +7 -0
+----
 
[ ... snip ...]
 
+
+* prepare-commit-msg.sample
+
+    Kaartic Sivaraam <[email protected]>
+    b22a3079466b72e8a8b76065d6c28efe7eea4b16 (clean-up)
+

For my part, I would be fine if we license contents of prepare-commit-msg.sample under the MIT license.

Signature · 1 line
Sivaraam