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

Re: ps/fetch-output-format (was: What's cooking in git.git (May 2023, #04; Thu, 11))

From
Patrick Steinhardt <ps@pks.im>
Date
May 12, 2023, 07:13 UTC
Message-ID
<ZF3nFaHjOxt4a3ee@ncase>
In-Reply-To
<xmqqo7mqs7rp.fsf@gitster.g>
On Thu, May 11, 2023 at 05:39:06PM -0700, Junio C Hamano wrote:
Show 16 quoted lines
> * ps/fetch-output-format (2023-05-10) 9 commits
>  - fetch: introduce machine-parseable "porcelain" output format
>  - fetch: move option related variables into main function
>  - fetch: lift up parsing of "fetch.output" config variable
>  - fetch: introduce `display_format` enum
>  - fetch: refactor calculation of the display table width
>  - fetch: print left-hand side when fetching HEAD:foo
>  - fetch: add a test to exercise invalid output formats
>  - fetch: split out tests for output format
>  - fetch: fix `--no-recurse-submodules` with multi-remote fetches
> 
>  "git fetch" learned the "--porcelain" option that emits what it did
>  in a machine-parseable format.
> 
>  Will merge to 'next'?
>  source: <cover.1683721293.git.ps@pks.im>

From my point of view the series is ready to be merged now, and Glen has also given his Reviewed-by.

We may add below diff to "fetch: introduce `display_format` enum". No further changes would be required for any of the other patches as we always explicitly initialize the value already and don't use the `UNKNOWN` value anywhere.

diff --git a/builtin/fetch.c b/builtin/fetch.c
index 462fc86b99..6583e31e3d 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -49,7 +49,6 @@ enum {
 };
 
 enum display_format {
-	DISPLAY_FORMAT_UNKNOWN = 0,
 	DISPLAY_FORMAT_FULL,
 	DISPLAY_FORMAT_COMPACT,
 	DISPLAY_FORMAT_PORCELAIN,

I'm rather indifferent though and feel like re-sending all patches only
to change this one line of code generates too much noise. But I'm happy
to adjust in order to make your life easier.

Thanks!

Patrick
Previous: Felipe ContrerasNext: Junio C Hamano
Message 5 of 9 in “What's cooking in git.git (May 2023, #04; Thu, 11)”
  1. Junio C HamanoMay 12, 2023
  2. Felipe ContrerasMay 12, 2023
  3. Taylor BlauMay 12, 2023
  4. Felipe ContrerasMay 12, 2023
  5. Patrick SteinhardtMay 12, 2023
  6. Junio C HamanoMay 12, 2023
  7. tl/push-branches-is-an-alias-for-all (Was: Re: What's cooking in git.git (May 2023, #04; Thu, 11))Elijah Newren, May 12, 2023
  8. Junio C HamanoMay 12, 2023
  9. brian m. carlsonMay 12, 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.