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

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

From
Stefan Beller <sbeller@google.com>
Date
Mar 16, 2017, 05:16 UTC
Message-ID
<CAGZ79kZ7rWw=q6a2AomTw20DsU1h+7ou4i8A14a2bcg+asRwLA@mail.gmail.com>
In-Reply-To
<xmqqvarac8hc.fsf@gitster.mtv.corp.google.com>
On Wed, Mar 15, 2017 at 6:31 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 29 quoted lines
> Stefan Beller <sbeller@google.com> writes:
>
>> 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.

ok. it helped me, though, to picture all possibilities to come up with what I consider best for each case. Yes in the end it can be described as 'report highest bit'.

Show 8 quoted lines
>
> 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.
yes, I agree. That is the actual question asked.
>
>
Previous: Junio C HamanoNext: Stefan Beller
Message 3 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.