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

Re: [RFC PATCH] short status: improve reporting for submodule changes

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 16, 2017, 01:31 UTC
Message-ID
<xmqqvarac8hc.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170316003332.30918-1-sbeller@google.com>
Stefan Beller <sbeller@google.com> writes:
Show 20 quoted lines
> While we already have a porcelain2 layer for git-status, that is accurate
> for submodules, users still like the way they are are used to of
> 'status -s'.
>
> As a submodule has more state than a file potentially, we'll look at all
> cases:
>
>    ------ new submodule commits
>  /  ----- modified files
>  | /   -- untracked files
>  | |  /
>  | | |   current / proposed reporting
>  0 0 0     "  "     "  "
>  0 0 1     " M"     " ?"
>  0 1 0     " M"     " m"
>  0 1 1     " M"     " m"
>  1 0 0     " M"     " M"
>  1 0 1     " M"     " M"
>  1 1 0     " M"     " M"
>  1 1 1     " M"     " M"

You are essentialy saying that there are three levels, 1. with commit level difference, 2. the same commit with local mods, 3. no mods but with crufts, and instead of wasting 8 letters to express all combinations, the highest level is reported, right? That sounds OK to me. I am not sure if "?" is a good letter to use (doesn't it usually mean it is an untracked cruft?), though.

Does the commit level difference really mean "has new commits"? It probably is not new problem but an old mistake inherited from the current code, but I suspect that you're just comparing the commit bound in the index of the superproject and the HEAD commit in the submodule, in which case "newness" does not matter a bit---"is it the same or different?" is the question you are asking, I would think.

Previous: Stefan BellerNext: Stefan Beller
Message 2 of 7 in “short status: improve reporting for submodule changes”
  1. short status: improve reporting for submodule changesStefan Beller, Mar 16, 2017
  2. Junio C HamanoMar 16, 2017
  3. Stefan BellerMar 16, 2017
  4. short status: improve reporting for submodule changesStefan Beller, Mar 16, 2017
  5. Jonathan NiederMar 16, 2017
  6. Stefan BellerMar 16, 2017
  7. Jonathan NiederMar 16, 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.