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

Re: [PATCH v3] stash: handle specifying stashes with spaces

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 9, 2014, 18:42 UTC
Message-ID
<xmqq1u0hatf9.fsf@gitster.dls.corp.google.com>
In-Reply-To
<loom.20140108T003945-67@post.gmane.org>
Øystein Walle <oystwa@gmail.com> writes:
> But it's seems the spaces trigger some other way of interpreting the
> selector. In my git.git, git rev-parse HEAD{0} gives me the same result
> as HEAD@{ 0 } but HEAD@{1} and HEAD@{ 1 } are different.

The integer to specify the nth reflog entry (or nth prior checkout) are never spelled with any SP stuffing. HEAD@{1} is the prior state, HEAD@{-1} is the previous branch; HEAD@{ 1 } nor HEAD@{ -1 } do not mean these things.

Any string inside @{...} that is _not_ a valid nth reflog entry specifier is interpreted as a human-readable timestamp via the approxidate logic (and used only when it makes sense). " 1" happens to mean "the first day of the month".

Previous: Øystein Walle
Message 6 of 6 in “stash: handle specifying stashes with spaces”
  1. stash: handle specifying stashes with spacesØystein Walle, Jan 7, 2014
  2. Junio C HamanoJan 7, 2014
  3. Thomas RastJan 7, 2014
  4. Junio C HamanoJan 7, 2014
  5. Øystein WalleJan 8, 2014
  6. Junio C HamanoJan 9, 2014

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.