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

Re: [PATCH] submodule: correct error message for missing commits.

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 26, 2017, 21:10 UTC
Message-ID
<xmqqshhiq4zm.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kaYQ5Lzz5i_+uLt3wWtid+YvDxXSyw=isaYj3+98X7Mbg@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 17 quoted lines
> We _do_ show the submodule as demonstrated by the code sample above
> if we possess the objects.
> ...
>> That sounds like a very sensible and user-centric behaviour to me,
>> and "not initialized" sounds like the right message to give in such
>> a case (as opposed to "commits not present"---even the user told us
>> they are not interesting, we may have them, so "not present" is not
>> just incorrect but irrelevant because that is not the reason why we
>> are not showing).
>
> So you are saying we should instead do:
>
>   if (not active)
>     message = "not initialized"
>   if (problems with object loading)
>     message = "commits not present"
>   ...
I think I am.
Show 8 quoted lines
>> Or are you saying that even the user told us that the submodule is
>> not interesting, if we had "init" it earlier even once, we show the
>> difference and with a wrong label?  Showing the difference sounds
>> like a bug that is more severe than using a wrong label to me.
>
> I looked through the man pages and they never specify if submodule
> activeness affects the superproject diff, so we'd want to change that
> so that only active submodules are diffed.

I would think that would match my expectation more closely; if I explicitly told Git to "deinit", and still see the diff to distrat me (i.e. the current behaviour), I would probably feel that it is a bug. I do not know about others who are used to the current beehaviour, though. Do people actively "deinit" a submodule that they once "init"ed, and if so for what purpose? It's not like they want to release the disk resource, so I'd imagine the only reason is to reduce the distracting noise, but I'd prefer to hear from real users rather than speculating.

Thanks.
Previous: Stefan Beller
Message 4 of 4 in “submodule: correct error message for missing commits.”
  1. submodule: correct error message for missing commits.Stefan Beller, Jul 26, 2017
  2. Junio C HamanoJul 26, 2017
  3. Stefan BellerJul 26, 2017
  4. Junio C HamanoJul 26, 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.