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

Re: [Resend PATCH] t3903 (stash): add failing test for ref of form ^{/message}

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 16, 2013, 19:11 UTC
Message-ID
<7veheal28i.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CA+sFfMfkoBcoPvJSYBGUe46EbMfiC7q6tVZs6db2NHrEb2gb7Q@mail.gmail.com>
Brandon Casey <drafnel@gmail.com> writes:
> The stash is implemented using the reflog.  The ^{/<text>} notation
> searches the commit history, not the reflog.  So I think it will be
> able to match the first entry in your stash stack, but not any of the
> other ones.
Good point, together with...
> An extension to the reflog dwimery that implements @{/<text>} could be
> interesting though.

"log -g --grep=<text>" gives you a way to eyeball, but with @{/<text>} you _might_ have a good way to name the revision.

I am not however so sure if it is useful outside the context of the stash, because the ones you would want to recover from a normal reflog is most likely the older version of what you already amended, so the latest hit will likely be the post-amend version, not the one closer to the original. You would end up eyeballing the output of "log --oneline -g -grep=<text>" and cutting from it.

> Just a bit of advice, maybe you should think about softening your tone
> a bit hmm?  I find this last sentence to be somewhat repelling and
> tend to refrain from responding to such.

Oh, so it wasn't just me. I was about to say something similar, along the lines of "people whom you just called myopic, because you did not understand the rationale behind their past work, are less likely to be inclined to help you. you would have more luck if you ask them nicely.", but I've long given up on helping him be a better community member and deleted that part.

Previous: Brandon CaseyNext: Brandon Casey
Message 6 of 12 in “t3903 (stash): add failing test for ref of form ^{/message}”
  1. t3903 (stash): add failing test for ref of form ^{/message}Ramkumar Ramachandra, Apr 16, 2013
  2. Junio C HamanoApr 16, 2013
  3. Ramkumar RamachandraApr 16, 2013
  4. Junio C HamanoApr 16, 2013
  5. Brandon CaseyApr 16, 2013
  6. Junio C HamanoApr 16, 2013
  7. Brandon CaseyApr 16, 2013
  8. Ramkumar RamachandraApr 16, 2013
  9. Ramkumar RamachandraApr 16, 2013
  10. Brandon CaseyApr 16, 2013
  11. Ramkumar RamachandraApr 17, 2013
  12. Junio C HamanoApr 17, 2013

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.