{"thread":{"id":"36727","subject":"[PATCH v8 0/2] format-patch --signature-file <file>","startedAt":"2014-05-22T01:53:07Z","lastAt":"2014-05-23T16:56:13Z","messageCount":9,"participants":["Jeremiah Mahler","Junio C Hamano"],"isPatch":true,"patchVersion":8,"patchTotal":2},"messages":[{"id":"242450","messageId":"1400723589-8975-1-git-send-email-jmmahler@gmail.com","threadId":"36727","inReplyTo":null,"subject":"[PATCH v8 0/2] format-patch --signature-file <file>","fromName":"Jeremiah Mahler","fromEmail":"jmmahler@gmail.com","sentAt":"2014-05-22T01:53:07Z","receivedAt":"2014-05-22T01:53:07Z","isPatch":true,"sender":{"key":"jmmahler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/154028?v=4"},"body":"v8 of patch to add format-patch --signature-file <file> option.\n\nThis revision includes more suggestions from Jeff King and Junio C Hamano.\n\n  - Renamed variable which stores the signature to 'mail-signature'\n\twhich better describes what is being stored.\n\n  - Fixed a declaration after code (forbidden by ISO C90).\n\n  - Simplified sed usage in test cases from a pipeline with\n    three stages to just one.\n\n  - Enclosed the creation of test data ('cat >mail-signature') inside\n\ta test_expect_* case.\n\n  - Test cases now add one blank line to the actual signature to match\n  \tthe signature output of Git.  Previously, the last of the output\n\twas deleted.\n\nThanks again for all the suggestions.\n\nJeff King (1):\n  format-patch: make newline after signature conditional\n\nJeremiah Mahler (1):\n  format-patch --signature-file <file>\n\n Documentation/config.txt           |  4 ++++\n Documentation/git-format-patch.txt |  4 ++++\n builtin/log.c                      | 25 +++++++++++++++++++++--\n t/t4014-format-patch.sh            | 41 ++++++++++++++++++++++++++++++++++++++\n 4 files changed, 72 insertions(+), 2 deletions(-)\n\n-- \nJeremiah Mahler\njmmahler@gmail.com\nhttp://github.com/jmahler\n"},{"id":"242451","messageId":"1400723589-8975-2-git-send-email-jmmahler@gmail.com","threadId":"36727","inReplyTo":"1400723589-8975-1-git-send-email-jmmahler@gmail.com","subject":"[PATCH v8 1/2] format-patch: make newline after signature conditional","fromName":"Jeremiah Mahler","fromEmail":"jmmahler@gmail.com","sentAt":"2014-05-22T01:53:08Z","receivedAt":"2014-05-22T01:53:08Z","isPatch":true,"sender":{"key":"jmmahler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/154028?v=4"},"body":"From: Jeff King <peff@peff.net>\n\nWhen we print an email signature, we print the divider \"--\n\\n\", then the signature string, then two newlines.\nTraditionally the signature is a one-liner (and the default\nis just the git version), so the extra newline makes sense.\n\nBut one could easily specify a longer, multi-line signature,\nlike:\n\n  git format-patch --signature='\n  this is my long signature\n\n  it has multiple lines\n  ' ...\n\nWe should notice that it already has its own trailing\nnewline, and suppress one of ours.\n\nSigned-off-by: Jeff King <peff@peff.net>\nSigned-off-by: Jeremiah Mahler <jmmahler@gmail.com>\n---\n builtin/log.c | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/log.c b/builtin/log.c\nindex 39e8836..5acc048 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -844,8 +844,13 @@ static void gen_message_id(struct rev_info *info, char *base)\n \n static void print_signature(void)\n {\n-\tif (signature && *signature)\n-\t\tprintf(\"-- \\n%s\\n\\n\", signature);\n+\tif (!signature || !*signature)\n+\t\treturn;\n+\n+\tprintf(\"-- \\n%s\", signature);\n+\tif (signature[strlen(signature)-1] != '\\n')\n+\t\tputchar('\\n');\n+\tputchar('\\n');\n }\n \n static void add_branch_description(struct strbuf *buf, const char *branch_name)\n-- \nJeremiah Mahler\njmmahler@gmail.com\nhttp://github.com/jmahler\n"},{"id":"242452","messageId":"1400723589-8975-3-git-send-email-jmmahler@gmail.com","threadId":"36727","inReplyTo":"1400723589-8975-1-git-send-email-jmmahler@gmail.com","subject":"[PATCH v8 2/2] format-patch --signature-file <file>","fromName":"Jeremiah Mahler","fromEmail":"jmmahler@gmail.com","sentAt":"2014-05-22T01:53:09Z","receivedAt":"2014-05-22T01:53:09Z","isPatch":true,"sender":{"key":"jmmahler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/154028?v=4"},"body":"Added option that allows a signature file to be used with format-patch\nso that signatures with newlines and other special characters can be\neasily included.\n\n  $ git format-patch --signature-file ~/.signature -1\n\nThe config variable format.signaturefile is also provided so that it\ncan be added by default.\n\n  $ git config format.signaturefile ~/.signature\n\n  $ git format-patch -1\n\nSigned-off-by: Jeremiah Mahler <jmmahler@gmail.com>\n---\n Documentation/config.txt           |  4 ++++\n Documentation/git-format-patch.txt |  4 ++++\n builtin/log.c                      | 16 +++++++++++++++\n t/t4014-format-patch.sh            | 41 ++++++++++++++++++++++++++++++++++++++\n 4 files changed, 65 insertions(+)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 1932e9b..140ed77 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -1114,6 +1114,10 @@ format.signature::\n \tSet this variable to the empty string (\"\") to suppress\n \tsignature generation.\n \n+format.signaturefile::\n+\tWorks just like format.signature except the contents of the\n+\tfile specified by this variable will be used as the signature.\n+\n format.suffix::\n \tThe default for format-patch is to output files with the suffix\n \t`.patch`. Use this variable to change that suffix (make sure to\ndiff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt\nindex 5c0a4ab..c0fd470 100644\n--- a/Documentation/git-format-patch.txt\n+++ b/Documentation/git-format-patch.txt\n@@ -14,6 +14,7 @@ SYNOPSIS\n \t\t   [(--attach|--inline)[=<boundary>] | --no-attach]\n \t\t   [-s | --signoff]\n \t\t   [--signature=<signature> | --no-signature]\n+\t\t   [--signature-file=<file>]\n \t\t   [-n | --numbered | -N | --no-numbered]\n \t\t   [--start-number <n>] [--numbered-files]\n \t\t   [--in-reply-to=Message-Id] [--suffix=.<sfx>]\n@@ -233,6 +234,9 @@ configuration options in linkgit:git-notes[1] to use this workflow).\n \tsignature option is omitted the signature defaults to the Git version\n \tnumber.\n \n+--signature-file=<file>::\n+\tWorks just like --signature except the signature is read from a file.\n+\n --suffix=.<sfx>::\n \tInstead of using `.patch` as the suffix for generated\n \tfilenames, use specified suffix.  A common alternative is\ndiff --git a/builtin/log.c b/builtin/log.c\nindex 5acc048..5e3cc29 100644\n--- a/builtin/log.c\n+++ b/builtin/log.c\n@@ -673,6 +673,7 @@ static void add_header(const char *value)\n static int thread;\n static int do_signoff;\n static const char *signature = git_version_string;\n+static const char *signature_file;\n static int config_cover_letter;\n \n enum {\n@@ -742,6 +743,8 @@ static int git_format_config(const char *var, const char *value, void *cb)\n \t}\n \tif (!strcmp(var, \"format.signature\"))\n \t\treturn git_config_string(&signature, var, value);\n+\tif (!strcmp(var, \"format.signaturefile\"))\n+\t\treturn git_config_pathname(&signature_file, var, value);\n \tif (!strcmp(var, \"format.coverletter\")) {\n \t\tif (value && !strcasecmp(value, \"auto\")) {\n \t\t\tconfig_cover_letter = COVER_AUTO;\n@@ -1235,6 +1238,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t\t\t    PARSE_OPT_OPTARG, thread_callback },\n \t\tOPT_STRING(0, \"signature\", &signature, N_(\"signature\"),\n \t\t\t    N_(\"add a signature\")),\n+\t\tOPT_FILENAME(0, \"signature-file\", &signature_file,\n+\t\t\t\tN_(\"add a signature from a file\")),\n \t\tOPT__QUIET(&quiet, N_(\"don't print the patch filenames\")),\n \t\tOPT_END()\n \t};\n@@ -1452,6 +1457,17 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t\t\tcover_letter = (config_cover_letter == COVER_ON);\n \t}\n \n+\tif (signature_file) {\n+\t\tstruct strbuf buf = STRBUF_INIT;\n+\n+\t\tif (signature && signature != git_version_string)\n+\t\t\tdie(_(\"cannot specify both signature and signature-file\"));\n+\n+\t\tif (strbuf_read_file(&buf, signature_file, 128) < 0)\n+\t\t\tdie_errno(_(\"unable to read signature file '%s'\"), signature_file);\n+\t\tsignature = strbuf_detach(&buf, NULL);\n+\t}\n+\n \tif (in_reply_to || thread || cover_letter)\n \t\trev.ref_message_ids = xcalloc(1, sizeof(struct string_list));\n \tif (in_reply_to) {\ndiff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh\nindex 9c80633..37d25c4 100755\n--- a/t/t4014-format-patch.sh\n+++ b/t/t4014-format-patch.sh\n@@ -762,6 +762,47 @@ test_expect_success 'format-patch --signature=\"\" suppresses signatures' '\n \t! grep \"^-- \\$\" output\n '\n \n+test_expect_success 'prepare mail-signature input' '\n+\tcat >mail-signature <<-\\EOF\n+\n+\tTest User <test.email@kernel.org>\n+\thttp://git.kernel.org/cgit/git/git.git\n+\n+\tgit.kernel.org/?p=git/git.git;a=summary\n+\n+\tEOF\n+'\n+\n+test_expect_success 'format-patch --signature-file=mail-signature' '\n+\tgit format-patch --stdout --signature-file=mail-signature -1 >output &&\n+\tcheck_patch output &&\n+\tsed -e \"1,/^-- \\$/d\" <output >actual &&\n+\t{\n+\t\tcat mail-signature && echo\n+\t} >expect &&\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_success 'format-patch with format.signaturefile config' '\n+\ttest_config format.signaturefile mail-signature &&\n+\tgit format-patch --stdout -1 >output &&\n+\tcheck_patch output &&\n+\tsed -e \"1,/^-- \\$/d\" <output >actual &&\n+\t{\n+\t\tcat mail-signature && echo\n+\t} >expect &&\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_success 'format-patch --signature and --signature-file die' '\n+\ttest_must_fail git format-patch --stdout --signature=\"foo\" \\\n+\t\t--signature-file=mail-signature -1 >output\n+'\n+\n+test_expect_success 'format-patch --no-signature and --signature-file OK' '\n+\tgit format-patch --stdout --no-signature --signature-file=mail-signature -1\n+'\n+\n test_expect_success TTY 'format-patch --stdout paginates' '\n \trm -f pager_used &&\n \ttest_terminal env GIT_PAGER=\"wc >pager_used\" git format-patch --stdout --all &&\n-- \nJeremiah Mahler\njmmahler@gmail.com\nhttp://github.com/jmahler\n"},{"id":"242487","messageId":"20140522142332.GA15095@hudson.localdomain","threadId":"36727","inReplyTo":"1400723589-8975-1-git-send-email-jmmahler@gmail.com","subject":"Re: [PATCH v8 0/2] format-patch --signature-file <file>","fromName":"Jeremiah Mahler","fromEmail":"jmmahler@gmail.com","sentAt":"2014-05-22T14:23:32Z","receivedAt":"2014-05-22T14:23:32Z","isPatch":true,"sender":{"key":"jmmahler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/154028?v=4"},"body":"Junio,\n\nOn Wed, May 21, 2014 at 06:53:07PM -0700, Jeremiah Mahler wrote:\n> v8 of patch to add format-patch --signature-file <file> option.\n> \n...\n> \n\nI just notice that my patch is in 'pu'.\nBut it is version 7 instead of the improved version 8.\n\n-- \nJeremiah Mahler\njmmahler@gmail.com\nhttp://github.com/jmahler\n"},{"id":"242514","messageId":"xmqqy4xtmyeg.fsf@gitster.dls.corp.google.com","threadId":"36727","inReplyTo":"20140522142332.GA15095@hudson.localdomain","subject":"Re: [PATCH v8 0/2] format-patch --signature-file <file>","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-05-22T19:00:39Z","receivedAt":"2014-05-22T19:00:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeremiah Mahler <jmmahler@gmail.com> writes:\n\n> I just notice that my patch is in 'pu'.\n> But it is version 7 instead of the improved version 8.\n\nYeah, I know.  In a distributed environment, multiple people work\nindependently and a sequence of event can go like this:\n\n - I read v7, comment, and queue it only so that I won't forget;\n - I attend to other topics;\n - I start the day's integration cycle, merging topics to the\n   integration branches, maint, master, next and pu;\n - You reroll v8 and post it;\n - I may not notice v8, or I may notice v8 but think it is not\n   worth to discard the integration work so far only to replace\n   v7 with v8.\n - The integration result is pushed out.\n\nA reminder is very much appreciated, but on the other hand it is not\nsomething unusual.  It happens all the time, and I usually am aware\nof it ;-)\n\nThanks.\n"},{"id":"242521","messageId":"20140522194119.GA20201@hudson.localdomain","threadId":"36727","inReplyTo":"xmqqy4xtmyeg.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v8 0/2] format-patch --signature-file <file>","fromName":"Jeremiah Mahler","fromEmail":"jmmahler@gmail.com","sentAt":"2014-05-22T19:41:19Z","receivedAt":"2014-05-22T19:41:19Z","isPatch":true,"sender":{"key":"jmmahler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/154028?v=4"},"body":"Junio,\n\nOn Thu, May 22, 2014 at 12:00:39PM -0700, Junio C Hamano wrote:\n> Jeremiah Mahler <jmmahler@gmail.com> writes:\n> \n> > I just notice that my patch is in 'pu'.\n> > But it is version 7 instead of the improved version 8.\n> \n> Yeah, I know.  In a distributed environment, multiple people work\n> independently and a sequence of event can go like this:\n> \n>  - I read v7, comment, and queue it only so that I won't forget;\n>  - I attend to other topics;\n>  - I start the day's integration cycle, merging topics to the\n>    integration branches, maint, master, next and pu;\n>  - You reroll v8 and post it;\n>  - I may not notice v8, or I may notice v8 but think it is not\n>    worth to discard the integration work so far only to replace\n>    v7 with v8.\n>  - The integration result is pushed out.\n> \n> A reminder is very much appreciated, but on the other hand it is not\n> something unusual.  It happens all the time, and I usually am aware\n> of it ;-)\n> \n> Thanks.\n\nThanks for explaining how this process works.\n\n-- \nJeremiah Mahler\njmmahler@gmail.com\nhttp://github.com/jmahler\n"},{"id":"242525","messageId":"xmqqtx8hmt7m.fsf@gitster.dls.corp.google.com","threadId":"36727","inReplyTo":"1400723589-8975-3-git-send-email-jmmahler@gmail.com","subject":"Re: [PATCH v8 2/2] format-patch --signature-file <file>","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-05-22T20:52:45Z","receivedAt":"2014-05-22T20:52:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeremiah Mahler <jmmahler@gmail.com> writes:\n\n> Added option that allows a signature file to be used with format-patch\n> so that signatures with newlines and other special characters can be\n> easily included.\n\ns/Added option/Add an option/.  I do not think \"with newlines and\nother special characters\" is the primary issue---isn't it more about\n\"I have chosen to use this mail-signature; do not force me to retype\nthe same all the time\"?\n\n>   $ git format-patch --signature-file ~/.signature -1\n\nThe recommended command-line convention (see gitcli(7)) is to use\n\"--option=value\", so an example would be better to follow it, i.e.\n\n    $ git format-patch -1 --signature-file=$HOME/.signature\n\n> The config variable format.signaturefile is also provided so that it\n> can be added by default.\n>\n>   $ git config format.signaturefile ~/.signature\n>   $ git format-patch -1\n\nSomething like:\n\n    To countermand the configuration variable for a specific run:\n\n\t$ git format-patch -1 --signature=\"This time only\"\n        $ git format-patch -1 --signature    ;# to use the default\n        $ git format-patch -1 --signature=\"\" ;# to add nothing\n\nis also needed here, I think.  Similarly, these two needs to be\ntested in the test scripts you are modifying.  Specifically:\n\n> +test_expect_success 'format-patch --no-signature and --signature-file OK' '\n> +\tgit format-patch --stdout --no-signature --signature-file=mail-signature -1\n> +'\n\nshould not just make sure \"format-patch\" does _something_, but needs\nto make sure it does not contain the contents of the configured mail\nsignagture file.\n\nI didn't see offhand if the tests make sure that a configured mail\nsignature can be overriden from the command line.  I think you would\nwant to test, with format-patch.signature-file pointing at the\nmail-signature file, at least these three cases:\n\n - Run \"format-patch --no-signature\" and make sure that stops the\n   contents from mail-signature file from being shown, and instead\n   no mail-signature is given.\n\n - Run \"format-patch --signature='this time only'\" and make sure\n   that stops the contents from mail-signature file from being shown\n   and \"this time only\" is used instead.\n\n - Run \"format-patch --signature-file=another-mail-signature\" and\n   make sure that stops the contents from mail-signature file from\n   being shown and the contents from the other file is used instead.\n\nTest for these \"negative cases\" is often what we forget, when we are\nthrilled to show off that the shiny new feature works as expected.\nWe need to ensure that the ways to stop the shiny new feature from\nkicking in will not be broken as well.\n\nThanks.\n"},{"id":"242556","messageId":"20140523055517.GA30019@hudson.localdomain","threadId":"36727","inReplyTo":"xmqqtx8hmt7m.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v8 2/2] format-patch --signature-file <file>","fromName":"Jeremiah Mahler","fromEmail":"jmmahler@gmail.com","sentAt":"2014-05-23T05:55:17Z","receivedAt":"2014-05-23T05:55:17Z","isPatch":true,"sender":{"key":"jmmahler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/154028?v=4"},"body":"Junio,\n\nOn Thu, May 22, 2014 at 01:52:45PM -0700, Junio C Hamano wrote:\n> Jeremiah Mahler <jmmahler@gmail.com> writes:\n> \n...\n>\n> Something like:\n> \n>     To countermand the configuration variable for a specific run:\n> \n> \t$ git format-patch -1 --signature=\"This time only\"\n>         $ git format-patch -1 --signature    ;# to use the default\n>         $ git format-patch -1 --signature=\"\" ;# to add nothing\n> \n...\n>\n> I didn't see offhand if the tests make sure that a configured mail\n> signature can be overriden from the command line.  I think you would\n> want to test, with format-patch.signature-file pointing at the\n> mail-signature file, at least these three cases:\n> \n>  - Run \"format-patch --no-signature\" and make sure that stops the\n>    contents from mail-signature file from being shown, and instead\n>    no mail-signature is given.\n> \n--no-signature should inhibit all signatures.\n\n>  - Run \"format-patch --signature='this time only'\" and make sure\n>    that stops the contents from mail-signature file from being shown\n>    and \"this time only\" is used instead.\n> \n>  - Run \"format-patch --signature-file=another-mail-signature\" and\n>    make sure that stops the contents from mail-signature file from\n>    being shown and the contents from the other file is used instead.\n> \nArguments on the command line should take precendence over\nanything in the config.\n\nYour comments make it clear that I have not accounted for all the possible\ncases.  Below is a table of all the reasonable cases.  It should account\nfor cases you mentioned as well as others.\n\n  Key:\n  ---\n  default: Git version number\n  sig1: .signature from column 1\n  file1: .signaturefile from column 1\n  sig2: --signature from column 2\n  file2: --signature-file in column 2\n\nA preceeding 'format.' is assumed for config.  .signature -> format.signature\nCommand line arguments take precedence over config options.\n\n|----------------------------+-------------------------------------+---------|\n| config  (1)                | argv  (2)                           |         |\n|----------------------------+-------------------------------------+---------|\n|                            |                                     | default |\n|                            | --signature                         | sig2    |\n|                            | --signature-file                    | file2   |\n|                            | --no-signature                      | none    |\n|                            | --no-signature-file                 | none    |\n|                            | --signature, --signature-file       | die     |\n|                            | --signature, --no-signature-file    | sig2    |\n|                            | --signature-file, --no-signature    | none    |\n|                            | --no-signature, --no-signature-file | none    |\n| .signature                 |                                     | sig1    |\n| .signature                 | --signature                         | sig2    |\n| .signature                 | --signature-file                    | file2   |\n| .signature                 | --no-signature                      | none    |\n| .signature                 | --no-signature-file                 | sig1    |\n| .signature                 | --signature, --signature-file       | die     |\n| .signature                 | --signature, --no-signature-file    | sig2    |\n| .signature                 | --signature-file, --no-signature    | none    |\n| .signature                 | --no-signature, --no-signature-file | none    |\n| .signaturefile             |                                     | file1   |\n| .signaturefile             | --signature                         | sig2    |\n| .signaturefile             | --signature-file                    | file2   |\n| .signaturefile             | --no-signature                      | none    |\n| .signaturefile             | --no-signature-file                 | default |\n| .signaturefile             | --signature, --signature-file       | die     |\n| .signaturefile             | --signature, --no-signature-file    | sig2    |\n| .signaturefile             | --signature-file, --no-signature    | none    |\n| .signaturefile             | --no-signature, --no-signature-file | none    |\n| .signature, .signaturefile |                                     | die     |\n| .signature, .signaturefile | --signature                         | sig2    |\n| .signature, .signaturefile | --signature-file                    | file2   |\n| .signature, .signaturefile | --no-signature                      | none    |\n| .signature, .signaturefile | --no-signature-file                 | sig1    |\n| .signature, .signaturefile | --signature, --signature-file       | die     |\n| .signature, .signaturefile | --signature, --no-signature-file    | sig2    |\n| .signature, .signaturefile | --signature-file, --no-signature    | none    |\n| .signature, .signaturefile | --no-signature, --no-signature-file | none    |\n|----------------------------+-------------------------------------+---------|\n\n\nThanks,\n-- \nJeremiah Mahler\njmmahler@gmail.com\nhttp://github.com/jmahler\n"},{"id":"242578","messageId":"xmqqbnuol9hu.fsf@gitster.dls.corp.google.com","threadId":"36727","inReplyTo":"20140523055517.GA30019@hudson.localdomain","subject":"Re: [PATCH v8 2/2] format-patch --signature-file <file>","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-05-23T16:56:13Z","receivedAt":"2014-05-23T16:56:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeremiah Mahler <jmmahler@gmail.com> writes:\n\n> Your comments make it clear that I have not accounted for all the possible\n> cases.  Below is a table of all the reasonable cases.  It should account\n> for cases you mentioned as well as others.\n>\n>   Key:\n>   ---\n>   default: Git version number\n>   sig1: .signature from column 1\n>   file1: .signaturefile from column 1\n>   sig2: --signature from column 2\n>   file2: --signature-file in column 2\n>\n> A preceeding 'format.' is assumed for config.  .signature -> format.signature\n> Command line arguments take precedence over config options.\n\n;-)\n\nI do not mind the full matrix if it is cleanly done.\n\nIt may be an overkill and a maintenance burden, especially if it can\nbe done only with a sequence of cut-and-paste repetition (i.e. not\nas a loop in the test script that synthesises the permutations).\n\nThe suggestion for those three combinations were meant to be an\neasy-to-implement-and-maintain compromise.\n\nThanks.\n\n> |----------------------------+-------------------------------------+---------|\n> | config  (1)                | argv  (2)                           |         |\n> |----------------------------+-------------------------------------+---------|\n> |                            |                                     | default |\n> |                            | --signature                         | sig2    |\n> |                            | --signature-file                    | file2   |\n> |                            | --no-signature                      | none    |\n> |                            | --no-signature-file                 | none    |\n> |                            | --signature, --signature-file       | die     |\n> |                            | --signature, --no-signature-file    | sig2    |\n> |                            | --signature-file, --no-signature    | none    |\n> |                            | --no-signature, --no-signature-file | none    |\n> | .signature                 |                                     | sig1    |\n> | .signature                 | --signature                         | sig2    |\n> | .signature                 | --signature-file                    | file2   |\n> | .signature                 | --no-signature                      | none    |\n> | .signature                 | --no-signature-file                 | sig1    |\n> | .signature                 | --signature, --signature-file       | die     |\n> | .signature                 | --signature, --no-signature-file    | sig2    |\n> | .signature                 | --signature-file, --no-signature    | none    |\n> | .signature                 | --no-signature, --no-signature-file | none    |\n> | .signaturefile             |                                     | file1   |\n> | .signaturefile             | --signature                         | sig2    |\n> | .signaturefile             | --signature-file                    | file2   |\n> | .signaturefile             | --no-signature                      | none    |\n> | .signaturefile             | --no-signature-file                 | default |\n> | .signaturefile             | --signature, --signature-file       | die     |\n> | .signaturefile             | --signature, --no-signature-file    | sig2    |\n> | .signaturefile             | --signature-file, --no-signature    | none    |\n> | .signaturefile             | --no-signature, --no-signature-file | none    |\n> | .signature, .signaturefile |                                     | die     |\n> | .signature, .signaturefile | --signature                         | sig2    |\n> | .signature, .signaturefile | --signature-file                    | file2   |\n> | .signature, .signaturefile | --no-signature                      | none    |\n> | .signature, .signaturefile | --no-signature-file                 | sig1    |\n> | .signature, .signaturefile | --signature, --signature-file       | die     |\n> | .signature, .signaturefile | --signature, --no-signature-file    | sig2    |\n> | .signature, .signaturefile | --signature-file, --no-signature    | none    |\n> | .signature, .signaturefile | --no-signature, --no-signature-file | none    |\n> |----------------------------+-------------------------------------+---------|\n>\n>\n> Thanks,\n"}]}