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

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.

Previous: Jeff KingNext: Eric Sunshine
Message 4 of 5 in “tag.c: move PGP verification code from plumbing”
  1. tag.c: move PGP verification code from plumbingsantiago@nyu.edu, Mar 25, 2016
  2. Eric SunshineMar 25, 2016
  3. Jeff KingMar 25, 2016
  4. Santiago TorresMar 25, 2016
  5. Eric SunshineMar 26, 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.