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

Re: Possible bug with git status in 1.7.0

From
Sergio Callegari <sergio.callegari@gmail.com>
Date
Feb 20, 2010, 11:05 UTC
Message-ID
<4B7FC1DE.2020802@gmail.com>
In-Reply-To
<4B7EFAD8.9040309@web.de>
Jens Lehmann wrote:
Show 14 quoted lines
> Yup, one line per submodule should be enough. But maybe it's nicer to
> have the details /after/ the submodule name:
>
> #	modified:   mod1 (Submodule has new commit(s), modified content, untracked content)
>
> Then it fits more nicely with the output for files, no?
>
> We could drop the "Submodule has " if people see it as a waste of screen
> estate. Also i have no strong feelings about "content", i just happen to
> think it is more appropriate as submodules can contain not only files but
> other submodules too. Opinions?
>
> Will send a patch for discussion as soon as i have something to show ...
>   
How about
#	modified:   mod1 (submodule: new commit(s), modified content, untracked content)

trying to assure that what comes after the ":" is a list of comma separated properties.

This can make the thing easier to parse. I know that there is a "git status ---porcelain" but from my understanding it will not be possible to get this kind of information from that command since its output format is frozen and not extensible, so many could resort to try to parse the "normal" git status output to get all the info about submodules at once.

Even better would be to have a "--interface_level 2" to go with ---porcelain, to be able to pass this info even there.

BTW... about the --porcelain option, I wonder if considering an alias to --parseable could be on the list. The plumbing/porcelain metaphor is really nice, but a --porcelain option can probably be a bit confusing for the beginner getting a

usage: git status [options] [--] <filepattern>...
    -v, --verbose         be verbose
    -s, --short           show status concisely
    --porcelain           show porcelain output format
    -z, --null            terminate entries with NUL
    -u, --untracked-files[=<mode>]
                          show untracked files, optional modes: all, 
normal, no. (Default: all)

considering that status is probably the first command the beginner may come into.

Sergio
Previous: Jens Lehmann
Message 7 of 7 in “Possible bug with git status in 1.7.0”
  1. SergioFeb 17, 2010
  2. Junio C HamanoFeb 17, 2010
  3. Sergio CallegariFeb 17, 2010
  4. Jens LehmannFeb 17, 2010
  5. Sergio CallegariFeb 19, 2010
  6. Jens LehmannFeb 19, 2010
  7. Sergio CallegariFeb 20, 2010

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.