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

Re: [PATCH] refs.h: rename submodule arguments to submodule_path

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 21, 2017, 01:12 UTC
Message-ID
<xmqqy3uu7ee3.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kYTqh=Qa+Pt1+MojrcYFr05HQgbPRcc=DvjCkUWsjP5Uw@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
> + Junio

Just like Michael, I do not have strong enough opinion for or against this patch to comment on it.

I do agree with you that it would be a good longer-term direction to use "submodule" for a "struct submodule" (i.e. submodule object), and call a string that names a submodule either "submodule_name" or "submodule_path" depending on how it names one, for maintainability of the code.

However I am not convinced that this patch is an improvement. Even though parameter names in decls only serve documentation purpose and it is even OK to only have type without name there, if we are going to _have_ names, it would make sense to match them to the parameter names actually used in the implementation.

Updating these names used in refs.c would make a very noisy patch, of course. But I am not sure if it is a good middle ground to avoid that and to update only refs.h.

Previous: Stefan BellerNext: Michael Haggerty
Message 3 of 6 in “refs.h: rename submodule arguments to submodule_path”
  1. refs.h: rename submodule arguments to submodule_pathStefan Beller, Apr 12, 2017
  2. Stefan BellerApr 20, 2017
  3. Junio C HamanoApr 21, 2017
  4. Michael HaggertyApr 21, 2017
  5. Michael HaggertyApr 21, 2017
  6. Duy NguyenApr 21, 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.