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

Re: [RFD] Git glossary: 'branch' and 'head' description

From
Shawn Pearce <spearce@spearce.org>
Date
May 21, 2006, 01:01 UTC
Message-ID
<20060521010129.GB7179@spearce.org>
In-Reply-To
<Pine.LNX.4.64.0605191853570.10823@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> wrote:
Show 8 quoted lines
> 
> On Fri, 19 May 2006, Daniel Barkalow wrote:
> > 
> > I guess I did forget that it sticks around. So you have to be doing 
> > something somewhat more complicated, like fetching the latest versions of 
> > multiple topic branches.
> 
> I actually don't think it's at all unlikely that I'd start using this.
Hey, if its useful.  :-) If its not then I'm doing something
wrong here...
 
[snip]
Show 9 quoted lines
> I'm not entirely sure about the syntax, though. It ends up being pretty 
> command-line-unfriendly. The "gitk ORIG_HEAD.." thing is fairly easy to 
> type, but typing
> 
> 	gitk 'master@{2 hours ago}'..
> 
> on a Finnish keyboard (yeah, that's what I still use) is "interesting", 
> since all of '@', '{' and '}' are complex characters (AltGr + '2', AltGr + 
> '7' and AltGr + '0' respectively), and you have to remember the quoting.

Wow. So what you are saying is writing any sort of C code must be rather painful. :-)

I received a suggestion of using ' (single quote) rather than { as the quoting character. I didn't make the quoting character optional as I realized users were likely to forget they needed it on date specs which contain ':', so I just made them required to keep things consistent at all times. Further {} won out over '' as {} is also used with the ^ operator (e.g. v1.3.3^{tree}).

Show 5 quoted lines
> Not that I see any obvious better syntax. Although allowing a shorthand 
> like "@2.hours.ago" for "current branch, at given date" might help a 
> bit, at least that wouldn't need quoting:
> 
> 	gitk @2.hours.ago..

The empty prefix for `HEAD` is simple. The '.' part would need to be fixed in approxidate() (and thus --since would also benefit). Omitting the {} might be OK but see above...

-- 
Shawn.
Previous: Linus TorvaldsNext: Jakub Narebski
Message 12 of 13 in “[RFD] Git glossary: 'branch' and 'head' description”
  1. Jakub NarebskiMay 17, 2006
  2. Junio C HamanoMay 17, 2006
  3. Jakub NarebskiMay 17, 2006
  4. Junio C HamanoMay 17, 2006
  5. Jakub NarebskiMay 17, 2006
  6. David KågedalMay 19, 2006
  7. Shawn PearceMay 19, 2006
  8. Daniel BarkalowMay 20, 2006
  9. Junio C HamanoMay 20, 2006
  10. Daniel BarkalowMay 20, 2006
  11. Linus TorvaldsMay 20, 2006
  12. Shawn PearceMay 21, 2006
  13. Jakub NarebskiMay 21, 2006

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.