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

Re: ~ and ^

From
Sean <seanlkml@sympatico.ca>
Date
May 13, 2007, 19:17 UTC
Message-ID
<20070513151709.76b5fc33.seanlkml@sympatico.ca>
In-Reply-To
<7v8xbssfti.fsf@assigned-by-dhcp.cox.net>

On Sun, 13 May 2007 12:07:21 -0700 Junio C Hamano <junkio@cox.net> wrote:

Show 6 quoted lines
> Interesting.
> 
> At least, "ls ~0" does not seem to get confused by bash to be
> the home directory of the root user, so I do not offhand think
> of a reason not to have ~$n as a synonym to HEAD~$n.  Would that
> be useful?  I dunno.

Not going to shake the world but it's a small convenience. Would be a bit nicer if a lone ~ worked as well without escaping, but I'm not sure you'd accept a patch to assume "~" whenever git is passed the users home directory as a lone option ;)

> P.S.
> 
> Welcome back to the list ;-)
> 
Thanks.
Sean
Previous: SeanNext: Robin Rosenberg
Message 5 of 6 in “~ and ^”
  1. SeanMay 13, 2007
  2. Junio C HamanoMay 13, 2007
  3. Karl HasselströmMay 13, 2007
  4. SeanMay 13, 2007
  5. SeanMay 13, 2007
  6. Robin RosenbergMay 13, 2007

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.