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

Re: Re* [PATCH] doc: glossary: add entry for revision range

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 18, 2021, 12:28 UTC
Message-ID
<60a3b2f8eb3b_1519872087c@natae.notmuch>
In-Reply-To
<YKNl6IAFGezjCZUf@coredump.intra.peff.net>
Jeff King wrote:
Show 24 quoted lines
> On Mon, May 17, 2021 at 12:22:56PM -0500, Felipe Contreras wrote:
> 
> > > > If we must not use @, then I would rather use `master..mybranch`, or
> > > > something like that. HEAD seems like a technical accident. But of course
> > > > I would prefer HEAD to nothing, because at least it qualifies as an
> > > > ending point.
> > > 
> > > I agree that if the purpose is to be illustrative, using shortcuts like
> > > "an empty endpoint means HEAD" is not helpful. And likewise for "@"; if
> > > you need to have "revision range" defined, there is a good chance that
> > > you don't know about shortcuts like "@" either.
> > 
> > But they don't need to know what @ means; it's clearly a shortcut for
> > _something_, and that's all they need to know. In fact, I'd say most
> > people can quickly realize what a shorcut for it is, which is why it was
> > picked by the git project, and many Mercurial projects as well.
> 
> That's my point. It _isn't_ clearly a shortcut for something for all
> people. If you are reading the glossary entry for "revision range", you
> might not know about the ".." syntax at all. So what does:
> 
>   foo..@
> 
> mean?
An ellipsis is a common feature of both human and computer languages...
  The ... fox jumps ...
Is easily understood by most English speakers, so is a, b, c ... z.
It is used in math as well 1, 2, 3,..., 100.

It's used in computer languages, like Pascal, Modula, Oberon, Ada, Haskell, Perl, Ruby, Swift, Kotlin, F#, and MATLAB.

  (1..10).each { |i| puts i }

I think most readers would infer that a) the starting point is at the left of the ending point b) there's nothing after the ending point.

So what could the thing at the right of the starting point, follwing an ellipsis, and not followed by anything else be? I think most people would get it.

> I expect most people would figure it out. But if your point is to serve
> as documentation, especially for people who do not yet know all of the
> concepts, then why not try to reduce the chance of error as much as
> possible?

We want to minimize the chances of error... up to a point. We also want to be useful.

Moreover, most readers don't learn at the speed they read, it takes time, and often practice. Copy-pasting `master..@` to their terminal will most likely work, and with any luck they'll understand it right away.

They don't need to understand revision ranges completely when they read the glossary, they just need a brief explanation.

[1] https://en.wikipedia.org/wiki/Ellipsis
-- 
Felipe Contreras
Previous: Jeff KingNext: Junio C Hamano
Message 7 of 19 in “doc: glossary: add entry for revision range”
  1. doc: glossary: add entry for revision rangeFelipe Contreras, May 16, 2021
  2. Re* [PATCH] doc: glossary: add entry for revision rangeJunio C Hamano, May 17, 2021
  3. Felipe ContrerasMay 17, 2021
  4. Jeff KingMay 17, 2021
  5. Felipe ContrerasMay 17, 2021
  6. Jeff KingMay 18, 2021
  7. Felipe ContrerasMay 18, 2021
  8. Junio C HamanoMay 17, 2021
  9. Felipe ContrerasMay 17, 2021
  10. Junio C HamanoMay 18, 2021
  11. Felipe ContrerasMay 18, 2021
  12. Jeff KingMay 18, 2021
  13. Junio C HamanoMay 18, 2021
  14. Felipe ContrerasMay 18, 2021
  15. Felipe ContrerasMay 18, 2021
  16. Jeff KingMay 18, 2021
  17. Felipe ContrerasMay 18, 2021
  18. Jeff KingMay 18, 2021
  19. Felipe ContrerasMay 18, 2021

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.