Re: [PATCH] log: fix indentation for --graph --show-signature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 8, 2014 at 7:12 AM, Zoltan Klinger <zoltan.klinger@xxxxxxxxx> wrote:
> The git log --graph --show-signature command incorrectly indents the gpg
> information about signed commits and merged signed tags. It does not
> follow the level of indentation of the current commit.
>
> Reported-by: Jason Pyeron <jpyeron@xxxxxxxx>
> Signed-off-by: Zoltan Klinger <zoltan.klinger@xxxxxxxxx>
> ---
> diff --git a/t/t4202-log.sh b/t/t4202-log.sh
> index cb03d28..b429aff 100755
> --- a/t/t4202-log.sh
> +++ b/t/t4202-log.sh
> @@ -3,6 +3,7 @@
>  test_description='git log'
>
>  . ./test-lib.sh
> +. "$TEST_DIRECTORY/lib-gpg.sh"
>
>  test_expect_success setup '
>
> @@ -841,4 +842,32 @@ test_expect_success 'dotdot is a parent directory' '
>         test_cmp expect actual
>  '
>
> +test_expect_success GPG 'log --graph --show-signature' '
> +       git checkout -b signed master &&

Do you want

    test_when_finished 'git reset --hard && git checkout master' &&

here in case of failure in this test in order to restore sanity for
tests which might be added later?

> +       echo foo >foo &&
> +       git add foo &&
> +       git commit -S -m signed_commit &&
> +       git log --graph --show-signature -n1 signed >actual &&
> +       grep "^| gpg: Signature made" actual &&
> +       grep "^| gpg: Good signature" actual
> +'
> +
> +test_expect_success GPG 'log --graph --show-signature for merged tag' '
> +       git checkout -b plain master &&
> +       echo aaa >bar &&
> +       git add bar &&
> +       git commit -m bar_commit

Broken &&-chain.

> +       git checkout -b tagged master &&

Ditto regarding test_when_finished.

> +       echo bbb >baz &&
> +       git add baz &&
> +       git commit -m baz_commit

Broken &&-chain.

> +       git tag -s -m signed_tag_msg signed_tag &&
> +       git checkout plain &&
> +       git merge --no-ff -m msg signed_tag &&
> +       git log --graph --show-signature -n1 plain >actual &&
> +       grep "^|\\\  merged tag" actual &&
> +       grep "^| | gpg: Signature made" actual &&
> +       grep "^| | gpg: Good signature" actual
> +'
> +
>  test_done
> --
> 2.0.0
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]