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

RE: Bug - Status - Space in Filename

From
JSJoseph Strauss <josephst@bhphoto.com>
Date
Nov 8, 2017, 17:27 UTC
Message-ID
<655aaa9d2abf4be1b6ade0574d88c999@EXMBX01B.bhphotovideo.local>
I believe I have found a bug in the way git status -s lists filenames.
According to the documentation:
  The fields (including the ->) are separated from each other by a single space. If a filename contains whitespace or other nonprintable characters,   that field will be quoted in the manner of a C string literal: surrounded by ASCII double quote (34) characters, and with interior special characters backslash-escaped.
While this is true in most situations, it does not seem to apply to merge conflicts. When a file has merge conflicts I am getting the following:
 $ git status -s
 UU some/path/with space/in/the/name
 M  "another/path/with space/in/the/name "

I found the same problem for the following versions: . git version 2.15.0.windows.1 . git version 2.10.0

Joseph Kalman Strauss Lifecycle Management Engineer B&H Photo 212-239-7500 x2212 josephst@bhphoto.com

Next: Junio C Hamano
Message 1 of 6 in “RE: Bug - Status - Space in Filename”
  1. Joseph StraussNov 8, 2017
  2. Junio C HamanoNov 9, 2017
  3. Jeff KingNov 9, 2017
  4. Junio C HamanoNov 10, 2017
  5. Jeff KingNov 10, 2017
  6. Junio C HamanoNov 10, 2017

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.