# [PATCH v1 1/2] t/README: remove mention of adding copyright notices

5 messages from 2017-11-26 to 2017-12-08. Participants: Thomas Gummerer, Jonathan Nieder.
Thread: https://gitlist.dev/t/47324

## Thomas Gummerer, 2017-11-26 20:20

Subject: [PATCH v1 1/2] t/README: remove mention of adding copyright notices
Message-ID: <20171126202100.1658-1-t.gummerer@gmail.com>
URL: https://gitlist.dev/e/20171126202100.1658-1-t.gummerer%40gmail.com

```
We generally no longer include copyright notices in new test scripts.
However t/README still mentions it as something to include at the top of
every new script.

Remove that mention as it's outdated.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---

I read through some parts of t/README, while working on the tests for
the worktree dwim patches, and noticed some things that are outdated/a
useful function that's not documented anywhere.  Here's a couple of
patches to fix that.

 t/README | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/t/README b/t/README
index 4b079e4494..448569b60e 100644
--- a/t/README
+++ b/t/README
@@ -332,13 +332,10 @@ Writing Tests
 -------------
 
 The test script is written as a shell script.  It should start
-with the standard "#!/bin/sh" with copyright notices, and an
+with the standard "#!/bin/sh", and an
 assignment to variable 'test_description', like this:
 
 	#!/bin/sh
-	#
-	# Copyright (c) 2005 Junio C Hamano
-	#
 
 	test_description='xxx test (option --frotz)
 
-- 
2.15.0.426.gb06021eeb


```

## Thomas Gummerer, 2017-11-26 20:21

Subject: [PATCH v1 2/2] t/README: document test_cmp_rev
Message-ID: <20171126202100.1658-2-t.gummerer@gmail.com>
URL: https://gitlist.dev/e/20171126202100.1658-2-t.gummerer%40gmail.com
In-Reply-To: <20171126202100.1658-1-t.gummerer@gmail.com>

```
test_cmp_rev is a useful function that's used in quite a few test
scripts.  It is however not documented in t/README.  Document it.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---
 t/README | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/t/README b/t/README
index 448569b60e..e867d1f8bd 100644
--- a/t/README
+++ b/t/README
@@ -674,6 +674,11 @@ library for your script to use.
    <expected> file.  This behaves like "cmp" but produces more
    helpful output when the test is run with "-v" option.
 
+ - test_cmp_rev <expected> <actual>
+
+   Check whether the <expected> rev points to the same commit as the
+   <actual> rev.
+
  - test_line_count (= | -lt | -ge | ...) <length> <file>
 
    Check whether a file has the length it is expected to.
-- 
2.15.0.426.gb06021eeb


```

## Jonathan Nieder, 2017-12-05 19:46

Subject: Re: [PATCH v1 2/2] t/README: document test_cmp_rev
Message-ID: <20171205194645.GA8183@aiede.mtv.corp.google.com>
URL: https://gitlist.dev/e/20171205194645.GA8183%40aiede.mtv.corp.google.com
In-Reply-To: <20171126202100.1658-2-t.gummerer@gmail.com>

```
Hi,

Thomas Gummerer wrote:

> test_cmp_rev is a useful function that's used in quite a few test
> scripts.  It is however not documented in t/README.  Document it.
>
> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
> ---
>  t/README | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

I admit I usually go straight to t/test-lib-functions.sh when I want
to find an appropriate helper.  I think this kind of introductory
documentation in t/README is still useful, though.

Thanks,
Jonathan

```

## Jonathan Nieder, 2017-12-05 19:49

Subject: Re: [PATCH v1 1/2] t/README: remove mention of adding copyright notices
Message-ID: <20171205194937.GB8183@aiede.mtv.corp.google.com>
URL: https://gitlist.dev/e/20171205194937.GB8183%40aiede.mtv.corp.google.com
In-Reply-To: <20171126202100.1658-1-t.gummerer@gmail.com>

```
Hi,

Thomas Gummerer wrote:

> We generally no longer include copyright notices in new test scripts.
> However t/README still mentions it as something to include at the top of
> every new script.

Where can I read more about this change?  Was it a deliberate change
or something that simply happened?

Thanks,
Jonathan

```

## Thomas Gummerer, 2017-12-08 20:47

Subject: Re: [PATCH v1 1/2] t/README: remove mention of adding copyright notices
Message-ID: <20171208204736.GA25616@hank>
URL: https://gitlist.dev/e/20171208204736.GA25616%40hank
In-Reply-To: <20171205194937.GB8183@aiede.mtv.corp.google.com>

```
On 12/05, Jonathan Nieder wrote:
> Hi,
> 
> Thomas Gummerer wrote:
> 
> > We generally no longer include copyright notices in new test scripts.
> > However t/README still mentions it as something to include at the top of
> > every new script.
> 
> Where can I read more about this change?  Was it a deliberate change
> or something that simply happened?

I'm not sure if it was a deliberate change, I just noticed that most
new test files don't have a copyright notice anymore.

    $ git grep "Copyright (c)" t/* | sed -E 's/.*?Copyright .c. ([[:digit:]]+).*?/\1/' | sort | uniq -c
         61 2005
         40 2006
         55 2007
         32 2008
         31 2009
         30 2010
         10 2011
         14 2012
          4 2013
          3 2014
          1 2015
          5 2016

While we may be adding less new test files, we definitely added a few
in 2017, for example t/t7521-ignored-mode.sh in 371c80c746 ("status:
test ignored modes", 2017-10-30), or t/t0025-crlf-renormalize.sh in
9472935d81 ("add: introduce "--renormalize"", 2017-11-16).


> Thanks,
> Jonathan

```
