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

Re: [PATCH v2 1/3] stash: It looks like a stash, but doesn't quack like a stash...

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 4, 2010, 23:31 UTC
Message-ID
<7v1vaeeyzq.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1280831775-30759-2-git-send-email-jon.seymour@gmail.com>
Jon Seymour <jon.seymour@gmail.com> writes:
Show 7 quoted lines
> In particular, a stash created with git stash create cannot be used as
> an argument to git stash branch because of two separate reasons.
>
> 1. a pre-condition assumes that there is always a stash on the stack when git stash branch is called,
> which is not necessarily true
>
> 2. the cleanup code assumes the specified stash is a stash reference, rather than an arbitrary commit.

Hmm, I don't use the command myself so I ended up reading the description of "stash branch". To me it is clear that it wants to use a stash entry, not just an arbitrary stash-looking commit, from "... then drops the <stash>".

So I wouldn't call these tests "expect-failure"; rather, I would suggest swapping the order of patches so that they test the new feature that allows "git stash branch" to take an arbitrary stash-looking commit.

The documentation also needs to be updated to make the "then drops" part conditional (perhaps "then drops...if the stash was on the list").

Are there any other stash subcommand that ought to be able to act on a stash-looking commit but doesn't, or is "branch" the only one?

Previous: Jon SeymourNext: Jon Seymour
Message 3 of 9 in “*** SUBJECT HERE ***”
  1. 0/3 *** SUBJECT HERE ***Jon Seymour, Aug 3, 2010
  2. 1/3 stash: It looks like a stash, but doesn't quack like a stash...Jon Seymour, Aug 3, 2010
  3. Junio C HamanoAug 4, 2010
  4. 2/3 stash: Allow git stash branch to process commits that look like stashes but are not stash references.Jon Seymour, Aug 3, 2010
  5. Junio C HamanoAug 4, 2010
  6. Jon SeymourAug 5, 2010
  7. Jon SeymourAug 5, 2010
  8. Junio C HamanoAug 5, 2010
  9. 3/3 stash: modify tests to reflect stash branch fixes.Jon Seymour, Aug 3, 2010

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.