git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH 1/2] log: add "log.showsignature" configuration variable

From
Remi Galan Alfonso <remi.galan-alfonso@ensimag.grenoble-inp.fr>
Date
May 26, 2016, 13:42 UTC
Message-ID
<156149583.51074.1464270131166.JavaMail.zimbra@ensimag.grenoble-inp.fr>
In-Reply-To
<20160526130647.27001-2-mehul.jain2029@gmail.com>
Hi Mehul,
Mehul Jain <mehul.jain2029@gmail.com> writes:
> People may want to always use "--show-signature" while using "git log"
> or "git show".
> 
> When log.showsignature set true, "git log" and "git show" will behave
'When log.showsignature is set to true' ?
> as "--show-signature" was given to them.
s/as/as if
Show 23 quoted lines
> Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
> ---
>  Documentation/git-log.txt |  4 ++++
>  builtin/log.c             |  6 ++++++
>  t/t4202-log.sh            | 19 +++++++++++++++++++
>  t/t7510-signed-commit.sh  |  7 +++++++
>  4 files changed, 36 insertions(+)
> [...]
> [...]
> +test_expect_success GPG 'log.showsignature=true behaves like --show-signature' '
> +        git checkout -b test_sign master &&
> +        echo foo >foo &&
> +        git add foo &&
> +        git commit -S -m signed_commit &&
> +        test_config log.showsignature true &&
> +        git log -1 signed >actual &&
> +        test_i18ngrep "gpg: Signature made" actual &&
> +        test_i18ngrep "gpg: Good signature" actual
> +'
> +
> +test_expect_success GPG '--show-signature overrides log.showsignature=false' '
> +        test_when_finished "git reset --hard && git checkout master" &&
> +        git config log.showsignature false &&

Any specific reason as to why you don't use test_config like in the first test?

Show 18 quoted lines
> +        git log -1 --show-signature signed >actual &&
> +        test_i18ngrep "gpg: Signature made" actual &&
> +        test_i18ngrep "gpg: Good signature" actual
> +'
> +
>  test_expect_success 'log --graph --no-walk is forbidden' '
>          test_must_fail git log --graph --no-walk
>  '
> diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
> index 4177a86..326dcc8 100755
> --- a/t/t7510-signed-commit.sh
> +++ b/t/t7510-signed-commit.sh
> @@ -210,4 +210,11 @@ test_expect_success GPG 'show lack of signature with custom format' '
>          test_cmp expect actual
>  '
>  
> +test_expect_success GPG 'log.showsignature behaves like --show-signature' '
> +        git config log.showsignature true &&
Same here.
> +        git show initial > actual &&
Style: no space after redirection.

Thanks, Rémi

Previous: Mehul JainNext: Mehul Jain
Message 3 of 18 in “Introduce "log.showSignature" config variable”
  1. 0/2 Introduce "log.showSignature" config variableMehul Jain, May 26, 2016
  2. 1/2 log: add "log.showsignature" configuration variableMehul Jain, May 26, 2016
  3. Remi Galan AlfonsoMay 26, 2016
  4. Mehul JainMay 26, 2016
  5. Remi Galan AlfonsoMay 26, 2016
  6. Mehul JainMay 26, 2016
  7. Pranit BauvaMay 27, 2016
  8. Jeff KingMay 26, 2016
  9. Mehul JainMay 27, 2016
  10. 2/2 log: add "--no-show-signature" command line optionMehul Jain, May 26, 2016
  11. Jeff KingMay 26, 2016
  12. Mehul JainMay 26, 2016
  13. Jeff KingMay 26, 2016
  14. Junio C HamanoMay 26, 2016
  15. Mehul JainMay 27, 2016
  16. Junio C HamanoMay 27, 2016
  17. Jeff KingMay 27, 2016
  18. Austin EnglishMay 27, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.