Subject: Re: [PATCH v8 2/2] format-patch --signature-file <file>

From: Junio C Hamano <[email-masked]>
Date: Fri, 23 May 2014 09:56:13 -0700

Jeremiah Mahler <[email-masked]> writes:

> 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.

;-)

I do not mind the full matrix if it is cleanly done.

It may be an overkill and a maintenance burden, especially if it can
be done only with a sequence of cut-and-paste repetition (i.e. not
as a loop in the test script that synthesises the permutations).

The suggestion for those three combinations were meant to be an
easy-to-implement-and-maintain compromise.

Thanks.

> |----------------------------+-------------------------------------+---------|
> | 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,