author | Thomas Rast <trast@student.ethz.ch> | |
Mon, 15 Feb 2010 16:05:46 +0000 (17:05 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 16 Feb 2010 05:46:27 +0000 (21:46 -0800) | ||
commit | 460ccd0e19774fd5e4f69de5a454068c686ac5a6 | |
tree | f507de18c02dedc3c2bbebab7856df5ee3b51467 | tree | snapshot |
parent | 8324b977aef3d2301f170e23f498b50e11302575 | commit | diff |
stash pop: remove 'apply' options during 'drop' invocation
The 'git stash pop' option parsing used to remove the first argument
in --index mode. At the time this was implemented, this first
argument was always --index. However, since the invention of the -q
option in fcdd0e9 (stash: teach quiet option, 2009-06-17) you can
cause an internal invocation of
git stash drop --index
by running
git stash pop -q --index
which then of course fails because drop doesn't know --index.
To handle this, instead let 'git stash apply' decide what the future
argument to 'drop' should be.
Warning: this means that 'git stash apply' must parse all options that
'drop' can take, and deal with them in the same way. This is
currently true for its only option -q.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The 'git stash pop' option parsing used to remove the first argument
in --index mode. At the time this was implemented, this first
argument was always --index. However, since the invention of the -q
option in fcdd0e9 (stash: teach quiet option, 2009-06-17) you can
cause an internal invocation of
git stash drop --index
by running
git stash pop -q --index
which then of course fails because drop doesn't know --index.
To handle this, instead let 'git stash apply' decide what the future
argument to 'drop' should be.
Warning: this means that 'git stash apply' must parse all options that
'drop' can take, and deal with them in the same way. This is
currently true for its only option -q.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-stash.sh | diff | blob | history | |
t/t3903-stash.sh | diff | blob | history |