git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 3/3] git-p4: add "Nvidia Corporation" to copyright header

From
Elijah Newren <newren@gmail.com>
Date
Dec 11, 2021, 21:19 UTC
Message-ID
<CABPp-BEyBLzWY2andDXZV6AgkQpnt1sp_rSThy84=qXMt2D8nA@mail.gmail.com>
In-Reply-To
<20211210153101.35433-4-jholdsworth@nvidia.com>
On Fri, Dec 10, 2021 at 12:30 PM Joel Holdsworth <jholdsworth@nvidia.com> wrote:
Show 21 quoted lines
>
> The inclusion of the coorporate copyright is a stipulation of the
> company code release process.
> ---
>  git-p4.py | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/git-p4.py b/git-p4.py
> index 5568d44c72..17e18265dc 100755
> --- a/git-p4.py
> +++ b/git-p4.py
> @@ -5,6 +5,7 @@
>  # Author: Simon Hausmann <simon@lst.de>
>  # Copyright: 2007 Simon Hausmann <simon@lst.de>
>  #            2007 Trolltech ASA
> +#            2021 Nvidia Corporation
>  # License: MIT <http://www.opensource.org/licenses/mit-license.php>
>  #
>  # pylint: disable=invalid-name,missing-docstring,too-many-arguments,broad-except
> --
> 2.33.0

Can we just get rid of all these copyright notices from all files in Git? They're obviously out-of-date and not even close to an accurate indicator of authorship. For example, builtin/branch.c has:

 * Copyright (c) 2006 Kristian Høgsberg <krh@redhat.com>
 * Based on git-branch.sh by Junio C Hamano.

Kristian only authored 1 patch for this file (though that one patch was submitted and attributed to Lars Hjemli in c31820c26b ("Make git-branch a builtin", 2006-10-23) with a note in the commit message about Kristian being the real author). I added a simple replace object to change the author attribution on Kristian's commit back to him, and then...

Looking at shortlog, there are 86 different authors, with the top 7 having this many commits:

$ git shortlog -sn --no-merges -- builtin/branch.c builtin-branch.c | head -n 7
    42 Junio C Hamano
    37 Jeff King
    30 Nguyễn Thái Ngọc Duy
    16 Karthik Nayak
    12 René Scharfe
    11 Lars Hjemli
    11 Ævar Arnfjörð Bjarmason

Looking at git blame, there are 61 different authors who have lines of code surviving until today, with the top 7 being:

$ git blame -C -C builtin/branch.c | awk '{print $3 " " $4}' | sort |
uniq -c | sort -rn | head -n 7
    139 (Junio C
    129 (Nguyễn Thái
    122 (Karthik Nayak
     40 (Jeff King
     38 (Kristian H�gsberg
     36 (Sahil Dua
     35 (René Scharfe

So the copyright notice is horribly misleading at best. It also seems like the wrong way to figure out the answer to _any_ question I can think of. (Some examples: "Who can review my changes to this file?", "Who do I need to contact for permission to relicense?", "Who should I praise for doing the work of making this code so great for me?", etc.) -- in all cases, shortlog, log, and blame are better tools.

Can we just git rid of these lines entirely?
Previous: Luke DiamandNext: brian m. carlson
Message 8 of 9 in “Transition git-p4.py to support Python 3 only”
  1. 0/3 Transition git-p4.py to support Python 3 onlyJoel Holdsworth, Dec 10, 2021
  2. 1/3 git-p4: remove support for Python 2Joel Holdsworth, Dec 10, 2021
  3. Andrew OakleyDec 12, 2021
  4. Ævar Arnfjörð BjarmasonDec 12, 2021
  5. 2/3 git-p4: eliminate decode_stream and encode_streamJoel Holdsworth, Dec 10, 2021
  6. 3/3 git-p4: add "Nvidia Corporation" to copyright headerJoel Holdsworth, Dec 10, 2021
  7. Luke DiamandDec 10, 2021
  8. Elijah NewrenDec 11, 2021
  9. brian m. carlsonDec 13, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.