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

Re: [PATCH v3] git-submodule.sh: shorten submodule SHA-1s using rev-parse

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Feb 4, 2019, 19:01 UTC
Message-ID
<CAPig+cQezC8_T=pms=XY71+9pP2WgdvdyiF9+UwarFB8sXo+Tw@mail.gmail.com>
In-Reply-To
<xmqqftt3v1ah.fsf@gitster-ct.c.googlers.com>
On Mon, Feb 4, 2019 at 1:47 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes:
> > On Sun, Feb 3, 2019 at 4:01 PM Sven van Haastregt <svenvh@gmail.com> wrote:
> >> We cannot always rely on successfully invoking `git rev-parse` in the
> >> submodule directory.  Keep the old method using `cut` as a fallback.
> >
> > Reviewers and future readers of this patch are left in the dark
> > regarding the circumstances in which git-rev-parse may fail in the
> > submodule directory. It would be helpful for the commit message to
> > explain this potential failure in enough detail for someone working in
> > this area in the future to understand any implications of changes to
> > this code.
>
> Replace that problematic sentence with something like
>
>         As a submodule may not be initialized with "submodule init"
>         or not cloned, `git rev-parse` may not work in it yet; as a
>         fallback, use the original method of cutting at 7 hexdigits.
>
> perhaps?
That's better.
Previous: Junio C Hamano
Message 4 of 4 in “git-submodule.sh: shorten submodule SHA-1s using rev-parse”
  1. git-submodule.sh: shorten submodule SHA-1s using rev-parseSven van Haastregt, Feb 3, 2019
  2. Eric SunshineFeb 3, 2019
  3. Junio C HamanoFeb 4, 2019
  4. Eric SunshineFeb 4, 2019

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.