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

2014-01-09 Thread Junio C Hamano
Øystein Walle oys...@gmail.com 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

[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

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

2014-01-07 Thread Junio C Hamano
Øystein Walle oys...@gmail.com 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

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

2014-01-07 Thread Thomas Rast
Junio C Hamano gits...@pobox.com writes: Øystein Walle oys...@gmail.com 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

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

2014-01-07 Thread Junio C Hamano
Thomas Rast t...@thomasrast.ch writes: Junio C Hamano gits...@pobox.com writes: Øystein Walle oys...@gmail.com 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

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

2014-01-07 Thread Øystein Walle
Junio C Hamano gitster at pobox.com writes: Thomas Rast tr at thomasrast.ch writes: Junio C Hamano gitster at 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