git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / Atom feed
From: Denton Liu <liu.denton@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Ævar Arnfjörð Bjarmason <avarab@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Eric Sunshine <sunshine@sunshineco.com>,
	Johannes Sixt <j6t@kdbg.org>,
	Philip Oakley <philipoakley@iee.email>
Subject: [PATCH v2 00/13] format-patch: clean up tests and documentation
Date: Tue, 27 Aug 2019 00:04:47 -0400
Message-ID: <cover.1566878373.git.liu.denton@gmail.com> (raw)
In-Reply-To: <cover.1566635008.git.liu.denton@gmail.com>

In this reroll, I squashed Junio's suggestion into the correct patch.
Also, I took Eric's suggestion and removed the weak justification (i.e.
better error messages) from the sed patch since it doesn't really
contribute.


As one of the older parts of the Git, the tests and documentation for
format-patch have been needing cleanup for a while. Let's do that in
this patchset!

This patchset is based on v3 of "format-patch: learn
--infer-cover-subject option (also t4014 cleanup)"[1].

Changes since v1:

* Squash Junio's patch into the correct patch ;)

* Remove weak justification (better error messages) in 8/13

Changes since v3 of "format-patch: learn --infer-cover-subject option (also
t4014 cleanup)":

* Squash in Junio's and Hannes' suggestions

* Add 't4014: let sed open its own files'

[1]: https://public-inbox.org/git/xmqqwof3ljcz.fsf@gitster-ct.c.googlers.com/T/#m19570aff4828dfbd65d57cacf231c2938af1dc9f


Denton Liu (13):
  t4014: drop unnecessary blank lines from test cases
  t4014: s/expected/expect/
  t4014: move closing sq onto its own line
  t4014: use sq for test case names
  t4014: remove spaces after redirect operators
  t4014: use indentable here-docs
  t4014: drop redirections to /dev/null
  t4014: let sed open its own files
  t4014: use test_line_count() where possible
  t4014: remove confusing pipe in check_threading()
  t4014: stop losing return codes of git commands
  Doc: add more detail for git-format-patch
  config/format.txt: specify default value of format.coverLetter

 Documentation/config/format.txt    |   1 +
 Documentation/git-format-patch.txt |  23 +-
 t/t4014-format-patch.sh            | 814 ++++++++++++++---------------
 3 files changed, 421 insertions(+), 417 deletions(-)

Range-diff against v1:
 1:  fb000bfca2 =  1:  fb000bfca2 t4014: drop unnecessary blank lines from test cases
 2:  0a5ce9b95f =  2:  0a5ce9b95f t4014: s/expected/expect/
 3:  5c49703aa4 =  3:  5c49703aa4 t4014: move closing sq onto its own line
 4:  02a11147fd =  4:  02a11147fd t4014: use sq for test case names
 5:  8d9791c061 =  5:  8d9791c061 t4014: remove spaces after redirect operators
 6:  90ad0fcf70 =  6:  90ad0fcf70 t4014: use indentable here-docs
 7:  804b3163f8 =  7:  804b3163f8 t4014: drop redirections to /dev/null
 8:  7d9a24a979 !  8:  967e624bb4 t4014: let sed open its own files
    @@ Commit message
         t4014: let sed open its own files
     
         In some cases, we were using a redirection operator to feed input into
    -    sed. However, since sed is capable of opening its own files and provides
    -    better error messages on IO failure, make sed open its own files instead
    -    of redirecting input into it.
    +    sed. However, since sed is capable of opening its own files, make sed
    +    open its own files instead of redirecting input into it.
     
         Signed-off-by: Denton Liu <liu.denton@gmail.com>
     
 9:  d068d42098 =  9:  9a42ec2b7e t4014: use test_line_count() where possible
10:  6a9409cee0 = 10:  8acc90f74d t4014: remove confusing pipe in check_threading()
11:  c580ce447b = 11:  bc7355485f t4014: stop losing return codes of git commands
12:  a97f861e6a ! 12:  fd343b99c5 Doc: add more detail for git-format-patch
    @@ Commit message
         In git-format-patch.txt, we were missing some key user information.
         First of all, document the special value of `--base=auto`.
     
    -    Next, while we're at it, surround option arguments with <>.
    +    Next, while we're at it, surround option arguments with <> and change
    +    existing names such as "Message-Id" to "message id", which conforms with
    +    how existing documentation is written.
     
         Finally, document the `format.outputDirectory` config and change
         `format.coverletter` to use camel case.
    @@ Documentation/git-format-patch.txt: SYNOPSIS
      		   [-n | --numbered | -N | --no-numbered]
      		   [--start-number <n>] [--numbered-files]
     -		   [--in-reply-to=Message-Id] [--suffix=.<sfx>]
    -+		   [--in-reply-to=<Message-Id>] [--suffix=.<sfx>]
    ++		   [--in-reply-to=<message id>] [--suffix=.<sfx>]
      		   [--ignore-if-in-upstream]
     -		   [--rfc] [--subject-prefix=Subject-Prefix]
    -+		   [--rfc] [--subject-prefix=<Subject-Prefix>]
    ++		   [--rfc] [--subject-prefix=<subject prefix>]
      		   [(--reroll-count|-v) <n>]
      		   [--to=<email>] [--cc=<email>]
      		   [--[no-]cover-letter] [--quiet]
    @@ Documentation/git-format-patch.txt: Beware that the default for 'git send-email'
      will want to ensure that threading is disabled for `git send-email`.
      
     ---in-reply-to=Message-Id::
    -+--in-reply-to=<Message-Id>::
    ++--in-reply-to=<message id>::
      	Make the first mail (or all the mails with `--no-thread`) appear as a
    - 	reply to the given Message-Id, which avoids breaking threads to
    +-	reply to the given Message-Id, which avoids breaking threads to
    ++	reply to the given <message id>, which avoids breaking threads to
      	provide a new patch series.
    + 
    + --ignore-if-in-upstream::
    +@@ Documentation/git-format-patch.txt: will want to ensure that threading is disabled for `git send-email`.
    + 	patches being generated, and any patch that matches is
    + 	ignored.
    + 
    +---subject-prefix=<Subject-Prefix>::
    ++--subject-prefix=<subject prefix>::
    + 	Instead of the standard '[PATCH]' prefix in the subject
    +-	line, instead use '[<Subject-Prefix>]'. This
    ++	line, instead use '[<subject prefix>]'. This
    + 	allows for useful naming of a patch series, and can be
    + 	combined with the `--numbered` option.
    + 
     @@ Documentation/git-format-patch.txt: you can use `--suffix=-patch` to get `0001-description-of-my-change-patch`.
      --base=<commit>::
      	Record the base tree information to identify the state the
13:  7c8522abf2 <  -:  ---------- config/format.txt: specify default value of format.coverLetter
 -:  ---------- > 13:  4e429e1989 config/format.txt: specify default value of format.coverLetter
-- 
2.23.0.248.g3a9dd8fb08


  parent reply index

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 23:52 [PATCH v2 0/4] format-patch: learn --infer-cover-subject option Denton Liu
2019-08-19 23:52 ` [PATCH v2 1/4] t4014: clean up style Denton Liu
2019-08-20  2:41   ` Eric Sunshine
2019-08-19 23:52 ` [PATCH v2 2/4] Doc: add more detail for git-format-patch Denton Liu
2019-08-20  2:44   ` Eric Sunshine
2019-08-20  7:07     ` Denton Liu
2019-08-19 23:52 ` [PATCH v2 3/4] config/format.txt: make clear the default value of format.coverLetter Denton Liu
2019-08-20  2:47   ` Eric Sunshine
2019-08-19 23:52 ` [PATCH v2 4/4] format-patch: learn --infer-cover-letter option Denton Liu
2019-08-20  3:46   ` Eric Sunshine
2019-08-20  7:18 ` [PATCH v3 00/13] format-patch: learn --infer-cover-subject option (also t4014 cleanup) Denton Liu
2019-08-20  7:18   ` [PATCH v3 01/13] t4014: drop unnecessary blank lines from test cases Denton Liu
2019-08-20  7:18   ` [PATCH v3 02/13] t4014: s/expected/expect/ Denton Liu
2019-08-20 21:31     ` Eric Sunshine
2019-08-20  7:18   ` [PATCH v3 03/13] t4014: move closing sq onto its own line Denton Liu
2019-08-20  7:18   ` [PATCH v3 04/13] t4014: use sq for test case names Denton Liu
2019-08-20  7:18   ` [PATCH v3 05/13] t4014: remove spaces after redirect operators Denton Liu
2019-08-20  7:18   ` [PATCH v3 06/13] t4014: use indentable here-docs Denton Liu
2019-08-20  7:19   ` [PATCH v3 07/13] t4014: drop redirections to /dev/null Denton Liu
2019-08-20  7:19   ` [PATCH v3 08/13] t4014: use test_line_count() where possible Denton Liu
2019-08-20  7:19   ` [PATCH v3 09/13] t4014: remove confusing pipe in check_threading() Denton Liu
2019-08-20  7:19   ` [PATCH v3 10/13] t4014: stop losing return codes of git commands Denton Liu
2019-08-20  7:31     ` Denton Liu
2019-08-20 19:04       ` Johannes Sixt
2019-08-20  7:19   ` [PATCH v3 11/13] Doc: add more detail for git-format-patch Denton Liu
2019-08-21 18:26     ` Junio C Hamano
2019-08-20  7:19   ` [PATCH v3 12/13] config/format.txt: specify default value of format.coverLetter Denton Liu
2019-08-20  7:19   ` [PATCH v3 13/13] format-patch: learn --infer-cover-subject option Denton Liu
2019-08-21 19:32     ` Junio C Hamano
2019-08-23 18:15       ` Denton Liu
2019-08-23 18:46         ` Philip Oakley
2019-08-23 20:18           ` Junio C Hamano
2019-08-24  8:03             ` Denton Liu
2019-08-24 13:59               ` Philip Oakley
2019-08-26 14:30                 ` Junio C Hamano
2019-08-26 14:26               ` Junio C Hamano
2019-08-26 16:05                 ` Junio C Hamano
2019-08-22 20:18   ` [PATCH v3 00/13] format-patch: learn --infer-cover-subject option (also t4014 cleanup) Junio C Hamano
2019-08-23 18:19     ` Denton Liu
2019-08-23 20:25       ` Junio C Hamano
2019-08-24  8:25   ` [PATCH 00/13] format-patch: clean up tests and documentation Denton Liu
2019-08-24  8:26     ` [PATCH 01/13] t4014: drop unnecessary blank lines from test cases Denton Liu
2019-08-24  8:26     ` [PATCH 02/13] t4014: s/expected/expect/ Denton Liu
2019-08-24  8:26     ` [PATCH 03/13] t4014: move closing sq onto its own line Denton Liu
2019-08-24  8:26     ` [PATCH 04/13] t4014: use sq for test case names Denton Liu
2019-08-24  8:26     ` [PATCH 05/13] t4014: remove spaces after redirect operators Denton Liu
2019-08-24  8:27     ` [PATCH 06/13] t4014: use indentable here-docs Denton Liu
2019-08-24  8:27     ` [PATCH 07/13] t4014: drop redirections to /dev/null Denton Liu
2019-08-24  8:27     ` [PATCH 08/13] t4014: let sed open its own files Denton Liu
2019-08-26  0:42       ` Eric Sunshine
2019-08-24  8:27     ` [PATCH 09/13] t4014: use test_line_count() where possible Denton Liu
2019-08-24  8:27     ` [PATCH 10/13] t4014: remove confusing pipe in check_threading() Denton Liu
2019-08-24  8:27     ` [PATCH 11/13] t4014: stop losing return codes of git commands Denton Liu
2019-08-24  8:27     ` [PATCH 12/13] Doc: add more detail for git-format-patch Denton Liu
2019-08-26 15:20       ` Junio C Hamano
2019-08-26 16:07         ` Junio C Hamano
2019-08-24  8:27     ` [PATCH 13/13] config/format.txt: specify default value of format.coverLetter Denton Liu
2019-08-24  8:28     ` [PATCH 00/13] format-patch: clean up tests and documentation Denton Liu
2019-08-26 15:21       ` Junio C Hamano
2019-08-27  4:04     ` Denton Liu [this message]
2019-08-27  4:04       ` [PATCH v2 01/13] t4014: drop unnecessary blank lines from test cases Denton Liu
2019-08-27  4:04       ` [PATCH v2 02/13] t4014: s/expected/expect/ Denton Liu
2019-08-27  4:04       ` [PATCH v2 03/13] t4014: move closing sq onto its own line Denton Liu
2019-08-27  4:04       ` [PATCH v2 04/13] t4014: use sq for test case names Denton Liu
2019-08-27  4:05       ` [PATCH v2 05/13] t4014: remove spaces after redirect operators Denton Liu
2019-08-27  4:05       ` [PATCH v2 06/13] t4014: use indentable here-docs Denton Liu
2019-08-27  4:05       ` [PATCH v2 07/13] t4014: drop redirections to /dev/null Denton Liu
2019-08-27  4:05       ` [PATCH v2 08/13] t4014: let sed open its own files Denton Liu
2019-08-27  4:05       ` [PATCH v2 09/13] t4014: use test_line_count() where possible Denton Liu
2019-08-27  4:05       ` [PATCH v2 10/13] t4014: remove confusing pipe in check_threading() Denton Liu
2019-08-27  4:05       ` [PATCH v2 11/13] t4014: stop losing return codes of git commands Denton Liu
2019-08-27  4:05       ` [PATCH v2 12/13] Doc: add more detail for git-format-patch Denton Liu
2019-08-27  4:05       ` [PATCH v2 13/13] config/format.txt: specify default value of format.coverLetter Denton Liu
2019-09-04 11:21       ` [PATCH v2 00/13] format-patch: clean up tests and documentation Denton Liu
2019-09-05 19:56         ` Junio C Hamano
2019-09-05 21:40           ` Denton Liu
2019-10-11 19:12   ` [PATCH v4 0/3] format-patch: learn --cover-from-description option Denton Liu
2019-10-11 19:12     ` [PATCH v4 1/3] format-patch: remove erroneous and condition Denton Liu
2019-10-11 19:12     ` [PATCH v4 2/3] format-patch: use enum variables Denton Liu
2019-10-12  2:16       ` Junio C Hamano
2019-10-11 19:12     ` [PATCH v4 3/3] format-patch: teach --cover-from-description option Denton Liu
2019-10-12  2:36       ` Junio C Hamano
2019-10-11 19:23     ` [PATCH v4 4/3] fixup! " Denton Liu
2019-10-12  4:18     ` [PATCH v4 0/3] format-patch: learn " Junio C Hamano
2019-10-14 20:46     ` [PATCH v5 " Denton Liu
2019-10-14 20:46       ` [PATCH v5 1/3] format-patch: change erroneous and condition Denton Liu
2019-10-15  2:16         ` Junio C Hamano
2019-10-15  3:45           ` Denton Liu
2019-10-14 20:47       ` [PATCH v5 2/3] format-patch: use enum variables Denton Liu
2019-10-14 20:47       ` [PATCH v5 3/3] format-patch: teach --cover-from-description option Denton Liu
2019-10-15  2:25         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1566878373.git.liu.denton@gmail.com \
    --to=liu.denton@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=philipoakley@iee.email \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

git@vger.kernel.org list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror http://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git