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

Re: [PATCH 2/2] submodule.c: warn about missing submodule commit in recursive actions

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Sep 5, 2018, 23:32 UTC
Message-ID
<20180905233203.GE120842@aiede.svl.corp.google.com>
In-Reply-To
<20180905231952.28145-2-sbeller@google.com>
Hi,
Stefan Beller wrote:
> Subject: submodule.c: warn about missing submodule commit in recursive actions
Nit: the diff already tells me what file the change is in.  What I'd
be more interested in is the subsystem or what commands this affects.
Does this affect all --recurse-submodules commands, or just some?

Here, I think it's about common submodule code, so I guess 'submodule:' would be a fine prefix.

Show 6 quoted lines
> By checking if a submodule commit exists before attempting the update
> we can improve the error message from the
>     error(_("Submodule '%s' could not be updated."), path);
> to the new and more specific
>     error(_("Submodule '%s' doesn't have commit '%s'"),
>           path, oid_to_hex(new_oid));

Maybe it's just me, but I find this formatting where I cannot distinguish between a line that was wrapped early and the start of a callout hard to read. Some extra line breaks would help:

  By checking if a submodule commit exists before attempting the update
  we can improve the error message from the
      error(_("Submodule '%s' could not be updated."), path);
  to the new and more specific
      error(_("Submodule '%s' doesn't have commit '%s'"),
            path, oid_to_hex(new_oid));

Beyond that, I still don't know what this change does. Can you give an example? For example, what command would I run before and what bad result would I get, and what result does this patch produce instead?

Thanks, Jonathan

Previous: Stefan BellerNext: Martin Ågren
Message 3 of 6 in “submodule.c: convert submodule_move_head new argument to object id”
  1. 1/2 submodule.c: convert submodule_move_head new argument to object idStefan Beller, Sep 5, 2018
  2. 2/2 submodule.c: warn about missing submodule commit in recursive actionsStefan Beller, Sep 5, 2018
  3. Jonathan NiederSep 5, 2018
  4. Martin ÅgrenSep 6, 2018
  5. Jonathan NiederSep 5, 2018
  6. Junio C HamanoSep 6, 2018

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.