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

Re: [PATCH] docs: improve the example that illustrates git-notes path names

From
Taylor Blau <me@ttaylorr.com>
Date
Aug 3, 2020, 17:13 UTC
Message-ID
<20200803171313.GE50799@syl.lan>
In-Reply-To
<xmqq7dufwtio.fsf@gitster.c.googlers.com>
On Mon, Aug 03, 2020 at 10:04:15AM -0700, Junio C Hamano wrote:
Show 18 quoted lines
> Taylor Blau <me@ttaylorr.com> writes:
>
> >> diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
> >> index ced2e8280e..9fc1979531 100644
> >> --- a/Documentation/git-notes.txt
> >> +++ b/Documentation/git-notes.txt
> >> @@ -223,7 +223,7 @@ are taken from notes refs.  A notes ref is usually a branch which
> >>  contains "files" whose paths are the object names for the objects
> >>  they describe, with some directory separators included for performance
> >>  reasons footnote:[Permitted pathnames have the form
> >> -'ab'`/`'cd'`/`'ef'`/`'...'`/`'abcdef...': a sequence of directory
> >> +'12'`/`'34'`/`'56'`/`'...'`/`'789abc...': a sequence of directory
> >
> > I had to read this twice to figure out why the first 'ab' changed to
> > '12'. It appears that this is to avoid having to use 'gh...' in the
> > last directory, since 'g', 'h' and so on aren't hexadecimal digits.
>
> You can wrap-around to '0' after counting up to 'f', no ;-)?
;-).
Show 20 quoted lines
> Having '/.../' between '56' and '789' to indicate "there are more
> levels possible here" is somewhat misleading with the new example.
> We could argue that the original objectname does not have to be
> "123456789abc.." but then the whole exercise becomes somewhat
> pointless as the objectname could have been 'abcdef...abcdef...'.
>
> Another minor nit: it probably makes it read more natural to start
> counting from '0' when writing hexadecimal, if we really want to
> use sequence of ascending hexdigits.
>
> Using a seemingly random example 85/b4/.../808d9ee6debdf167ced3
> might be less confusing, because ...
>
> >>  names of two hexadecimal digits each followed by a filename with the
> >>  rest of the object ID.].
>
> ... I think these two lines is pleanty clear than any example, so I
> am OK with either the old or the updated example, but I think a
> seemingly random example as long as the leaf level does not share
> the leading hexdigits as the pathname would work the best.

I agree with your reasoning (it didn't occur to me as a problem before, but seeing it spelled out in front of me I could understand how such an example might be confusing).

Thanks, Taylor

Previous: Junio C HamanoNext: Noam Yorav-Raphael via GitGitGadget
Message 4 of 9 in “docs: improve the example that illustrates git-notes path names”
  1. docs: improve the example that illustrates git-notes path namesNoam Yorav-Raphael via GitGitGadget, Aug 3, 2020
  2. Taylor BlauAug 3, 2020
  3. Junio C HamanoAug 3, 2020
  4. Taylor BlauAug 3, 2020
  5. docs: improve the example that illustrates git-notes path namesNoam Yorav-Raphael via GitGitGadget, Aug 3, 2020
  6. Taylor BlauAug 3, 2020
  7. docs: improve the example that illustrates git-notes path namesNoam Yorav-Raphael via GitGitGadget, Aug 3, 2020
  8. Taylor BlauAug 3, 2020
  9. Junio C HamanoAug 3, 2020

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.