Re: [PATCH] stash: allow ref of a stash by index

2016-09-07 Thread Junio C Hamano
Øystein Walle writes: > diff --git a/git-stash.sh b/git-stash.sh > index 826af18..b026288 100755 > --- a/git-stash.sh > +++ b/git-stash.sh > @@ -384,7 +384,7 @@ parse_flags_and_rev() > i_tree= > u_tree= > > -REV=$(git rev-parse --no-flags --symbolic --sq "$@") ||

Re: [PATCH] stash: allow ref of a stash by index

2016-09-05 Thread Jeff King
On Mon, Sep 05, 2016 at 11:46:34PM +0200, Øystein Walle wrote: > The bash-specific code is a no-go, so here's a way to do it in a way > that I think is in line with Git's code style for shell scripts. I took > the liberty of removing the '|| exit 1' since the rev is verified later > on anyway, as

Re: [PATCH] stash: allow ref of a stash by index

2016-09-05 Thread Øystein Walle
Pasting text into Gmail's web interface is not conducive to sending tabs through the intertubes. But you get the idea.. Øsse

Re: [PATCH] stash: allow ref of a stash by index

2016-09-05 Thread Øystein Walle
Hi, guys I like this idea. It makes stash easier and quicker to use, and it "hides" the fact that it uses the reflog for keeping track of the made stashes. *Not* to say I discourage interested people from peeking under the hood. I just think it's nice to sometimes think of the stash as a separate

Re: [PATCH] stash: allow ref of a stash by index

2016-09-04 Thread Philip Oakley
From: "Johannes Schindelin" Hi, On Sat, 3 Sep 2016, Jeff King wrote: On Sat, Sep 03, 2016 at 07:21:18PM -0400, Aaron M Watson wrote: > Allows stashes to be referenced by index only. Instead of referencing > "stash@{n}" explicitly, it can simply be referenced as

Re: [PATCH] stash: allow ref of a stash by index

2016-09-04 Thread Johannes Schindelin
Hi, On Sat, 3 Sep 2016, Jeff King wrote: > On Sat, Sep 03, 2016 at 07:21:18PM -0400, Aaron M Watson wrote: > > > Allows stashes to be referenced by index only. Instead of referencing > > "stash@{n}" explicitly, it can simply be referenced as "n". > > This says "what" but not "why". I assume it

Re: [PATCH] stash: allow ref of a stash by index

2016-09-04 Thread Junio C Hamano
Jeff King writes: >> diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt >> index 92df596..af11cff 100644 >> --- a/Documentation/git-stash.txt >> +++ b/Documentation/git-stash.txt >> @@ -35,11 +35,12 @@ A stash is by default listed as "WIP on >> 'branchname'

Re: [PATCH] stash: allow ref of a stash by index

2016-09-03 Thread Jeff King
On Sat, Sep 03, 2016 at 07:21:18PM -0400, Aaron M Watson wrote: > Allows stashes to be referenced by index only. Instead of referencing > "stash@{n}" explicitly, it can simply be referenced as "n". This says "what" but not "why". I assume it is "because the former is more annoying to type". Are

[PATCH] stash: allow ref of a stash by index

2016-09-03 Thread Aaron M Watson
Allows stashes to be referenced by index only. Instead of referencing "stash@{n}" explicitly, it can simply be referenced as "n". Signed-off-by: Aaron M Watson ---  Documentation/git-stash.txt | 11 ---  git-stash.sh| 10 +-  t/t3907-stash-index.sh