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 17, 2013, 17:37 UTC
Message-ID
<7vbo9df48a.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CALkWK0kJOSBN8XTJKBLOqi4tUjjm9unr=No65TtW9V0qvKmV-A@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 5 quoted lines
> 1. Any stash that can be shown can be applied, but not necessarily
> popped or dropped (as the documentation indicates).  The reason for
> this is simple: a pop/drop attempts to clear the entry in the stash
> reflog as well, but all stashes need to have a corresponding reflog
> entry (for instance, those created with 'stash create').
Correct.

To show or apply, you only need a product of "stash create" that may not be linked anywhere in the refs or reflogs. But you can only pop or drop something on the stash reflog.

> 2. IS_STASH_LIKE is a misnomer: all it checks is that the given <rev>
> is a merge commit.

The purpose of the logic is to reject a mistake to name stuff that is clearly not a product of "stash create". The name is just being humble by not claiming "I know this is definitely a product of stash-create" but merely hinting "This smells like such an object"; I am not sure if that is a "misnomer".

You are free to try to think of a way to tighten the implemention to reject a random two-or-three parent merge commit that is not a product of "stash create". People already have looked at this code since it was written, and didn't find a reasonable way to tighten it without triggering false negatives, so I wouldn't be surprised if anybody tried it again today and failed.

Previous: Ramkumar Ramachandra
Message 12 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.