Re: [PATCH v2 3/3] git-p4: add "Nvidia Corporation" to copyright header
From: Elijah Newren <hidden>
Date: 2021-12-11 21:19:32
On Fri, Dec 10, 2021 at 12:30 PM Joel Holdsworth [off-list ref] wrote:
quoted hunk ↗ jump to hunk
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 [off-list ref]
* 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?