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

[RFC 0/4] ref-filter: remove printing from formatting logic

From
Оля Тележная <olyatelezhnaya@gmail.com>
Date
Mar 13, 2018, 10:25 UTC
Message-ID
<CAL21BmkmXKzdwYHu1pNxuHhaxqei4ekVbutbuv2jmv6=GgcG_A@mail.gmail.com>

The main idea of the patch is, if you want to format the output by ref-filter, you should have an ability to work with errors by yourself if you want to. So I decided not to touch signature of show_ref_array_item(), but to move all printing (I mean errors) to it. So that we could invoke format_ref_array_item() and be sure that we cold handle errors by ourselves.

The patch is not finished, but I decided to show it to you. There are still many places where we could die in the middle of formatting process. But, if you like the general idea, I will finish and re-send it.

Another question is about verify_ref_format(). Do we need to allow its users also to manage errors by themselves? I left the old scenario, printing everything in verify_ref_format() and die. If you have better ideas, please share them.

Thanks a lot! Olga

Next: Martin Ågren
Message 1 of 3 in “[RFC 0/4] ref-filter: remove printing from formatting logic”
  1. Оля ТележнаяMar 13, 2018
  2. Martin ÅgrenMar 13, 2018
  3. Оля ТележнаяMar 14, 2018

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.