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

git status --porcelain=v2 -z returns paths relative to root

From
Ondra Medek <xmedeko@gmail.com>
Date
Dec 4, 2023, 19:04 UTC
Message-ID
<CAJsoDaHbJvBkZR5V3rs5042ZrC1D32i_d6Lv1uS1ncWmWFkCMw@mail.gmail.com>
Hello,

git status Porcelain Format Version 1 ignores config "status.relativePaths" and returns paths relative to the working tree root always.

On the other hand, git status Porcelain Format Version 2 respects config "status.relativePaths". But, if the "-z" option is provided, i.e. "git status --porcelain=v2 -z" it also ignores "status.relativePaths" and returns paths relative to the working tree root. Is this a bug or undocumented behaviour? See https://git-scm.com/docs/git-status#_porcelain_format_version_2

Note: I would welcome some option to force git status to return
relative paths to the current working directory always.

Best regards Ondra Medek

Message 1 of 1 in “git status --porcelain=v2 -z returns paths relative to root”
  1. Ondra MedekDec 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.