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

Re: [PATCH v2 2/2] ref-filter: add new "signature" atom

From
Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Date
Jun 2, 2023, 08:23 UTC
Message-ID
<ZHmnFiykAixYUCgm@ugly>
In-Reply-To
<20230602023105.17979-3-five231003@gmail.com>
just some nitpicks from me:
On Fri, Jun 02, 2023 at 07:41:55AM +0530, Kousik Sanagavarapu wrote:
>Duplicate the code for outputting the signature and it's other
>

"its", not "it's". this repeats all over the place, so please look up the rules.

>+static void grab_signature(struct atom_value *val, int deref, struct 
>object *obj)
>+{
>+		if (!skip_prefix(name, "signature", &name) || (*name &&
>+			*name != ':'))
>+			continue;
>
this looks confusing.

but there appears to be no exception to the "no excess braces" rule for multi-line conditions, unlike for bodies - maybe there should be?

also, i would wrap logically, not right at the margin, so
	if (!skip_prefix(name, "signature", &name) ||
	    (*name && *name != ':'))
>+		else if (atom->u.signature.option == S_GRADE) {
>
brace symmetry rule violated.
>+			case 'R':
>+				v->s = xstrfmt("%c", (char)sigc.result);
>+			}
>
omitting the final 'break' looks like bad style to me.

regards, ossi

Previous: Kousik SanagavarapuNext: Junio C Hamano
Message 12 of 19 in “Add new "signature" atom”
  1. Kousik SanagavarapuMay 29, 2023
  2. 1/2 t/lib-gpg: introduce new prereq GPG2Kousik Sanagavarapu, May 29, 2023
  3. Christian CouderJun 1, 2023
  4. 2/2 ref-filter: add new "signature" atomKousik Sanagavarapu, May 29, 2023
  5. Christian CouderJun 1, 2023
  6. Christian CouderJun 1, 2023
  7. 0/2 Add new "signature" atomKousik Sanagavarapu, Jun 2, 2023
  8. 1/2 t/lib-gpg: introduce new prereq GPG2Kousik Sanagavarapu, Jun 2, 2023
  9. Christian CouderJun 2, 2023
  10. Kousik SanagavarapuJun 2, 2023
  11. 2/2 ref-filter: add new "signature" atomKousik Sanagavarapu, Jun 2, 2023
  12. Oswald BuddenhagenJun 2, 2023
  13. Junio C HamanoJun 2, 2023
  14. Eric SunshineJun 2, 2023
  15. Junio C HamanoJun 3, 2023
  16. Kousik SanagavarapuJun 2, 2023
  17. 0/2 Add new "signature" atomKousik Sanagavarapu, Jun 4, 2023
  18. 1/2 t/lib-gpg: introduce new prereq GPG2Kousik Sanagavarapu, Jun 4, 2023
  19. 2/2 ref-filter: add new "signature" atomKousik Sanagavarapu, Jun 4, 2023

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.