git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Santiago Torres <santiago@nyu.edu>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Git List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>
Subject: Re: [PATCH] tag.c: move PGP verification code from plumbing
Date: Fri, 25 Mar 2016 10:45:10 -0400	[thread overview]
Message-ID: <20160325144509.GA20375@LykOS> (raw)
In-Reply-To: <CAPig+cQe5bwHXq4_qegBCM8Kqoqiz7K2ZtVk0FGMSEUPWQHyYA@mail.gmail.com>

> > -       signal(SIGPIPE, SIG_IGN);
> >         while (i < argc)
> > -               if (verify_tag(argv[i++], flags))
> > +               name = argv[i++];
> > +               if (get_sha1(name, sha1))
> > +                       return error("tag '%s' not found.", name);
> > +
> > +               if (pgp_verify_tag(NULL, NULL, sha1, flags))
> >                         had_error = 1;
> 
> Meh, this isn't Python. Due to the missing braces, the only thing
> inside the while() loop is the assignment to 'name'; all the other
> indented code is outside the while().
> 
> Did you run the test suite following this change? Did it all pass? If
> so, perhaps an additional test or two to catch this sort of error
> would be warranted.

Wow, you're right! I just re-ran the tests again to make sure I didn't
miss anything. All the tests pass for me, so I'll write an extra case to
avoid this. Just to be sure, I should include it in t7030-verify-tag.sh
right?

All your other comments seem straightforward and on point. I'll apply
them right away :)

Thanks!
-Santiago.

  parent reply	other threads:[~2016-03-25 14:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-25  0:33 [PATCH] tag.c: move PGP verification code from plumbing santiago
2016-03-25  5:23 ` Eric Sunshine
2016-03-25  5:31   ` Jeff King
2016-03-25 14:45   ` Santiago Torres [this message]
2016-03-26  6:33     ` 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

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

  git send-email \
    --in-reply-to=20160325144509.GA20375@LykOS \
    --to=santiago@nyu.edu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --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.
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 NNTP newsgroup(s).