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

[PATCH 0/2] Print stash info in the v2 porcelain format

From
Øystein Walle <oystwa@gmail.com>
Date
Oct 21, 2021, 22:25 UTC
Message-ID
<20211021222532.463375-1-oystwa@gmail.com>

When --porcelain=v2 is given --show-stash is silently ignored. But the format is useful for quick gathering of repo status, for e.g. prompts. And indeed git's own git-prompt.sh supports printing a sigil when stash entries exist.

The first patch is just a very small refactoring. It's far from necessary (although as it stands the second patch depends on it) but it makes sense to me. The second patch is the one that counts.

Øystein Walle (2):
  status: count stash entries in separate function
  status: print stash info with --porcelain=v2 --show-stash
 Documentation/git-status.txt |  8 ++++++++
 t/t7064-wtstatus-pv2.sh      | 15 +++++++++++++++
 wt-status.c                  | 25 +++++++++++++++++++++++--
 3 files changed, 46 insertions(+), 2 deletions(-)
-- 
2.27.0
Next: Øystein Walle
Message 1 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.