Re: [PATCH v3] stash: handle specifying stashes with spaces

2014-01-09 Thread Junio C Hamano
Øystein Walle writes: > But it's seems the spaces trigger some other way of interpreting the > selector. In my git.git, git rev-parse HEAD{0} gives me the same result > as HEAD@{ 0 } but HEAD@{1} and HEAD@{ 1 } are different. The integer to specify the nth reflog entry (or nth prior checkout) ar

Re: [PATCH v3] stash: handle specifying stashes with spaces

2014-01-07 Thread Øystein Walle
Junio C Hamano pobox.com> writes: > > Thomas Rast thomasrast.ch> writes: > > > Junio C Hamano pobox.com> writes: > > > >> > >> This is brittle. If new tests are added before this, the test_tick > >> will give you different timestamp and this test will start failing. > >> > >> Perhaps grab th

Re: [PATCH v3] stash: handle specifying stashes with spaces

2014-01-07 Thread Junio C Hamano
Thomas Rast writes: > Junio C Hamano writes: > >> Øystein Walle writes: >> >>> + git stash && >>> + test_tick && >>> + echo cow > file && >>> + git stash && >>> + git stash apply "stash@{Thu Apr 7 15:17:13 2005 -0700}" && >> >> This is brittle. If new tests are added before this, the

Re: [PATCH v3] stash: handle specifying stashes with spaces

2014-01-07 Thread Thomas Rast
Junio C Hamano writes: > Øystein Walle writes: > >> +git stash && >> +test_tick && >> +echo cow > file && >> +git stash && >> +git stash apply "stash@{Thu Apr 7 15:17:13 2005 -0700}" && > > This is brittle. If new tests are added before this, the test_tick > will give you di

Re: [PATCH v3] stash: handle specifying stashes with spaces

2014-01-07 Thread Junio C Hamano
Øystein Walle writes: > When trying to pop/apply a stash specified with an argument containing > spaces git-stash will throw an error: > > $ git stash pop 'stash@{two hours ago}' > Too many revisions specified: stash@{two hours ago} > > This happens because word splitting is used to count

[PATCH v3] stash: handle specifying stashes with spaces

2014-01-07 Thread Øystein Walle
When trying to pop/apply a stash specified with an argument containing spaces git-stash will throw an error: $ git stash pop 'stash@{two hours ago}' Too many revisions specified: stash@{two hours ago} This happens because word splitting is used to count non-option arguments. Make use of r