git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremiah Mahler <jmmahler@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v8 2/2] format-patch --signature-file <file>
Date: Thu, 22 May 2014 22:55:17 -0700	[thread overview]
Message-ID: <20140523055517.GA30019@hudson.localdomain> (raw)
In-Reply-To: <xmqqtx8hmt7m.fsf@gitster.dls.corp.google.com>

Junio,

On Thu, May 22, 2014 at 01:52:45PM -0700, Junio C Hamano wrote:
> Jeremiah Mahler <jmmahler@gmail.com> writes:
> 
...
>
> Something like:
> 
>     To countermand the configuration variable for a specific run:
> 
> 	$ git format-patch -1 --signature="This time only"
>         $ git format-patch -1 --signature    ;# to use the default
>         $ git format-patch -1 --signature="" ;# to add nothing
> 
...
>
> I didn't see offhand if the tests make sure that a configured mail
> signature can be overriden from the command line.  I think you would
> want to test, with format-patch.signature-file pointing at the
> mail-signature file, at least these three cases:
> 
>  - Run "format-patch --no-signature" and make sure that stops the
>    contents from mail-signature file from being shown, and instead
>    no mail-signature is given.
> 
--no-signature should inhibit all signatures.

>  - Run "format-patch --signature='this time only'" and make sure
>    that stops the contents from mail-signature file from being shown
>    and "this time only" is used instead.
> 
>  - Run "format-patch --signature-file=another-mail-signature" and
>    make sure that stops the contents from mail-signature file from
>    being shown and the contents from the other file is used instead.
> 
Arguments on the command line should take precendence over
anything in the config.

Your comments make it clear that I have not accounted for all the possible
cases.  Below is a table of all the reasonable cases.  It should account
for cases you mentioned as well as others.

  Key:
  ---
  default: Git version number
  sig1: .signature from column 1
  file1: .signaturefile from column 1
  sig2: --signature from column 2
  file2: --signature-file in column 2

A preceeding 'format.' is assumed for config.  .signature -> format.signature
Command line arguments take precedence over config options.

|----------------------------+-------------------------------------+---------|
| config  (1)                | argv  (2)                           |         |
|----------------------------+-------------------------------------+---------|
|                            |                                     | default |
|                            | --signature                         | sig2    |
|                            | --signature-file                    | file2   |
|                            | --no-signature                      | none    |
|                            | --no-signature-file                 | none    |
|                            | --signature, --signature-file       | die     |
|                            | --signature, --no-signature-file    | sig2    |
|                            | --signature-file, --no-signature    | none    |
|                            | --no-signature, --no-signature-file | none    |
| .signature                 |                                     | sig1    |
| .signature                 | --signature                         | sig2    |
| .signature                 | --signature-file                    | file2   |
| .signature                 | --no-signature                      | none    |
| .signature                 | --no-signature-file                 | sig1    |
| .signature                 | --signature, --signature-file       | die     |
| .signature                 | --signature, --no-signature-file    | sig2    |
| .signature                 | --signature-file, --no-signature    | none    |
| .signature                 | --no-signature, --no-signature-file | none    |
| .signaturefile             |                                     | file1   |
| .signaturefile             | --signature                         | sig2    |
| .signaturefile             | --signature-file                    | file2   |
| .signaturefile             | --no-signature                      | none    |
| .signaturefile             | --no-signature-file                 | default |
| .signaturefile             | --signature, --signature-file       | die     |
| .signaturefile             | --signature, --no-signature-file    | sig2    |
| .signaturefile             | --signature-file, --no-signature    | none    |
| .signaturefile             | --no-signature, --no-signature-file | none    |
| .signature, .signaturefile |                                     | die     |
| .signature, .signaturefile | --signature                         | sig2    |
| .signature, .signaturefile | --signature-file                    | file2   |
| .signature, .signaturefile | --no-signature                      | none    |
| .signature, .signaturefile | --no-signature-file                 | sig1    |
| .signature, .signaturefile | --signature, --signature-file       | die     |
| .signature, .signaturefile | --signature, --no-signature-file    | sig2    |
| .signature, .signaturefile | --signature-file, --no-signature    | none    |
| .signature, .signaturefile | --no-signature, --no-signature-file | none    |
|----------------------------+-------------------------------------+---------|


Thanks,
-- 
Jeremiah Mahler
jmmahler@gmail.com
http://github.com/jmahler

  reply	other threads:[~2014-05-23  5:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22  1:53 [PATCH v8 0/2] format-patch --signature-file <file> Jeremiah Mahler
2014-05-22  1:53 ` [PATCH v8 1/2] format-patch: make newline after signature conditional Jeremiah Mahler
2014-05-22  1:53 ` [PATCH v8 2/2] format-patch --signature-file <file> Jeremiah Mahler
2014-05-22 20:52   ` Junio C Hamano
2014-05-23  5:55     ` Jeremiah Mahler [this message]
2014-05-23 16:56       ` Junio C Hamano
2014-05-22 14:23 ` [PATCH v8 0/2] " Jeremiah Mahler
2014-05-22 19:00   ` Junio C Hamano
2014-05-22 19:41     ` Jeremiah Mahler

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

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

  git send-email \
    --in-reply-to=20140523055517.GA30019@hudson.localdomain \
    --to=jmmahler@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).