Re: [PATCH] tag.c: move PGP verification code from plumbing
- From
Santiago Torres <santiago@nyu.edu>
- Date
- Mar 25, 2016, 14:45 UTC
- Message-ID
- <20160325144509.GA20375@LykOS>
- In-Reply-To
- <CAPig+cQe5bwHXq4_qegBCM8Kqoqiz7K2ZtVk0FGMSEUPWQHyYA@mail.gmail.com>
Show 17 quoted lines
> > - 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.