threads / discuss / 57268

Dangling copyright in git hook template

Subject: Dangling copyright in git hook template

## tl;dr

3 messages between Jan 19, 2022 and Jan 19, 2022.

replies: 2people: 2as markdown or json

Frederic Tessier· Jan 19, 2022, 17:51 UTC · lore

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue) git init

What did you expect to happen? (Expected behavior) New repo initialized containing no copyright claims

What happened instead? (Actual behavior) New repo initialized with a copyright claim in .git/hooks/pre-rebase.sample: # Copyright (c) 2006, 2008 Junio C Hamano

What's different between what you expected and what actually happened? There is a file in the fresh repo (copied from the template file git-core/templates/hooks/pre-rebase.sample) which contains a copyright statement, moreover without any licence to use the file.

Anything else you want to add: This also happens upon running the 'git clone' command. This is an issue because when users clone a project, they are left with a copyrighted dependency (without any licence), even though the repository itself did not contain that file. This occurs tacitly, and users would be unknowingly violating the copyright if they happened to further convey the file.

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info] git version: git version 2.34.1

[Enabled Hooks]
Junio C Hamano· Jan 19, 2022, 19:49 UTC · re: Frederic Tessier · lore

Re: Dangling copyright in git hook template

Frederic Tessier <ftessier@gmail.com> writes:
Show 6 quoted lines
> What did you expect to happen? (Expected behavior)
> New repo initialized containing no copyright claims
>
> What happened instead? (Actual behavior)
> New repo initialized with a copyright claim in .git/hooks/pre-rebase.sample:
> # Copyright (c) 2006, 2008 Junio C Hamano

Because the sample files are copied verbatim, with or without such copyright notice message, they are copyrighted by their respective copyright holders. And their modification and distribution should follow the same licensing terms (i.e. GPLv2) as our source files.

Removing that single line would not change anything, as these days the written copyright notice is optional across the globe.

We could probably stop shipping these .sample hook files, or the users can ignore them with the same ease.

I dunno. An alternative position on the other extreme is to find and convince all the copyright holders of template/, relicense these files under less restrictive license _and_ state the license clearly in each of these files. I think that ought to be our long term direction.

Thanks for bringing this up.
Frederic Tessier· Jan 19, 2022, 21:25 UTC · re: Junio C Hamano · lore

Re: Dangling copyright in git hook template

Hi,

Thank you for the quick response! My approach on this was that the line tripped the licence analysis for our organization projects, but you are entirely right: removing the line does not change anything, as the copyright notice is optional (I did not know that was true globally, thanks for pointing that out).

It would be great if the samples were explicitly under MIT licence or other permissive option. In the short term, perhaps do not copy the templates by default, or make that a git config option, or else not copy the templates when running `git clone`?

I realize this is not a big deal, especially since it is unlikely someone would distribute files in .git by mistake. However, upon cloning my repo, someone could be under the *impression* that I am violating copyright since it appears in the repo; alas, my employer (government) is a stickler when it comes to managing copyright! :-)

At any rate, minor point, but thanks for listening, and for taking the time to reply. Much appreciated.

Regards, Frédéric.

On Wed, 19 Jan 2022 at 14:49, Junio C Hamano <gitster@pobox.com> wrote:
Show 28 quoted lines
>
> Frederic Tessier <ftessier@gmail.com> writes:
>
> > What did you expect to happen? (Expected behavior)
> > New repo initialized containing no copyright claims
> >
> > What happened instead? (Actual behavior)
> > New repo initialized with a copyright claim in .git/hooks/pre-rebase.sample:
> > # Copyright (c) 2006, 2008 Junio C Hamano
>
> Because the sample files are copied verbatim, with or without such
> copyright notice message, they are copyrighted by their respective
> copyright holders.  And their modification and distribution should
> follow the same licensing terms (i.e. GPLv2) as our source files.
>
> Removing that single line would not change anything, as these days
> the written copyright notice is optional across the globe.
>
> We could probably stop shipping these .sample hook files, or the
> users can ignore them with the same ease.
>
> I dunno.  An alternative position on the other extreme is to find
> and convince all the copyright holders of template/, relicense these
> files under less restrictive license _and_ state the license clearly
> in each of these files.  I think that ought to be our long term
> direction.
>
> Thanks for bringing this up.

← back to recent threads