Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:14

Jon Seymour [off-list ref] writes:
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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help