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".