git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Mehul Jain <mehul.jain2029@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v3 0/3] Introduce log.showSignature config variable
Date: Wed, 22 Jun 2016 23:32:15 -0700	[thread overview]
Message-ID: <xmqqd1n8jtzk.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CA+DCAeQUJ4D4kjR6FtTibwPO8o+wv-hQNDDj2ysJaBHGTPkHgA@mail.gmail.com> (Mehul Jain's message of "Thu, 23 Jun 2016 11:14:27 +0530")

Mehul Jain <mehul.jain2029@gmail.com> writes:

> In patch 2/3 and 3/3, there are many tests which requires a branch
> similar to that of "signed" branch, i.e. a branch with a commit having
> GPG signature. So previously in v2, I created two new branches,
> "test_sign" and "no_sign", which are identical to that of "signed"
> branch. And with these branches, I wrote the tests in patch 2/3
> and 3/3.
>
> As suggested by Eric [1], rather than creating new branches, I
> can take advantage of "signed" branch which already exists.

Yeah, I understand that part.  But you do not _need_ to do the split
you do in 1/3 in order to reuse "signed".

The first 'log --graph --signature' test may fail, but it is not
like that the test without 1/3 removes the "signed" branch when
"log" command or the signature tests of its output fail, so "I
didn't want the later tests to depend on the first test being
successful" does not quite justify the split.  If "commit -S" step,
which 1/3 splits into the earlier one of the two, fails, then you
won't have a signed commit to use in the later tests, even though
you have "signed" branch.  The split of the tests done by 1/3 does
not make the tests more robust.  If the commands in the original
in the part of the first test in the original that you keep in the
first half with 1/3 fail, subsequent tests will be affected with or
without 1/3.

If 1/3 justifies the change a bit differently, it would become a
good one.

    In 2/3 and 3/3, we will use the same 'signed' branch that the
    first test for 'log --graph --show-signature' uses.  This branch
    is currently created in that 'log --graph --show-signature' test
    itself.

    Split the set-up part into a test of its own, and make the
    existing first test into a separate one that only inspects the
    history on the 'signed' branch.  That way, it would become
    clearer that later tests added by 2/3 and 3/3 reuse the 'signed'
    branch in the same way this 'log --graph --show-signature' uses
    that same branch.

Of course, you would need to keep GPG prerequisite for both halves
1/3 creates.

Thanks.

  reply	other threads:[~2016-06-23  6:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 16:51 [PATCH v3 0/3] Introduce log.showSignature config variable Mehul Jain
2016-06-22 16:51 ` [PATCH v3 1/3] t4202: refactor test Mehul Jain
2016-06-24 14:12   ` Mehul Jain
2016-06-22 16:51 ` [PATCH v3 2/3] log: add "--no-show-signature" command line option Mehul Jain
2016-06-22 16:51 ` [PATCH v3 3/3] log: add log.showSignature configuration variable Mehul Jain
2016-06-22 20:31 ` [PATCH v3 0/3] Introduce log.showSignature config variable Junio C Hamano
2016-06-23  5:44   ` Mehul Jain
2016-06-23  6:32     ` Junio C Hamano [this message]
2016-06-24  9:21       ` Mehul Jain
2016-06-24 12:25         ` Eric Sunshine

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqd1n8jtzk.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mehul.jain2029@gmail.com \
    --cc=sunshine@sunshineco.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).