From: Stephen Boyd Date: Mon, 15 Feb 2010 18:46:35 GMT Subject: Re: [PATCH v2] stash pop: remove 'apply' options during 'drop' invocation Message-ID: <4B79968B.7060606@gmail.com> In-Reply-To: <2927b3dc67ab0b9067d4fe849e85654125706b91.1266249586.git.trast@student.ethz.ch> On 02/15/2010 08:05 AM, Thomas Rast wrote: > 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 > Acked-by: Stephen Boyd