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

Re: [PATCH 2/2] status: print stash info with --porcelain=v2 --show-stash

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 21, 2021, 23:47 UTC
Message-ID
<xmqq1r4egct2.fsf@gitster.g>
In-Reply-To
<20211021222532.463375-3-oystwa@gmail.com>
Øystein Walle <oystwa@gmail.com> writes:
Show 7 quoted lines
> The v2 porcelain format is very convenient for obtaining a lot of
> information about the current state of the repo, but does not contain
> any info about the stash. git status already accepts --show-stash but
> it's silently ignored when --porcelain=v2 is given.
>
> Let's add a simple line to print the number of stash entries but in a
> format similar in style to the rest of the format.

Who is the primary target audience of this feature? IDEs that read from "git status --porcelain"?

Whoever it is, if they bothered enough to pass an extra option (i.e. "--show-stash") to their "git status" invocation, I wonder if they want to know at least what "git stash list" would give you at the same time. After all, the --porcelain output is all about machine readability and reducing the number of forks would be what those people would be interested in, wouldn't it? I dunno.

Thanks.
Previous: Øystein WalleNext: Eric Sunshine
Message 5 of 8 in “Print stash info in the v2 porcelain format”
  1. 0/2 Print stash info in the v2 porcelain formatØystein Walle, Oct 21, 2021
  2. 1/2 status: count stash entries in separate functionØystein Walle, Oct 21, 2021
  3. Junio C HamanoOct 21, 2021
  4. 2/2 status: print stash info with --porcelain=v2 --show-stashØystein Walle, Oct 21, 2021
  5. Junio C HamanoOct 21, 2021
  6. Eric SunshineOct 22, 2021
  7. Junio C HamanoOct 22, 2021
  8. Eric SunshineOct 22, 2021

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.