Re: [RFC PATCH v4] revision: new rev^-n shorthand for rev^n..rev

2016-09-27 Thread Jeff King
On Mon, Sep 26, 2016 at 02:55:45PM -0700, Junio C Hamano wrote: > Taking these two together, perhaps squashing this in may be > sufficient. > [...] > diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c > index 2c3da19..9474c37 100644 > --- a/builtin/rev-parse.c > +++ b/builtin/rev-parse.c > @@

Re: [RFC PATCH v4] revision: new rev^-n shorthand for rev^n..rev

2016-09-26 Thread Junio C Hamano
Vegard Nossum writes: > +test_expect_success 'rev-parse merge^-0' ' > + test_must_fail git rev-parse merge^-0 > +' > + > +test_expect_success 'rev-parse merge^-3' ' > + test_must_fail git rev-parse merge^-3 > +' > + > +test_expect_success 'rev-parse merge^-^' '

Re: [RFC PATCH v4] revision: new rev^-n shorthand for rev^n..rev

2016-09-26 Thread Junio C Hamano
Junio C Hamano writes: > Micronit. When splitting "for (init; fini; cont)" into multiple > lines, it is often easier to read to make that into three lines: > > for (parent_number = 1, parents = commit->parents; >parents; >parents = parents->next,

Re: [RFC PATCH v4] revision: new rev^-n shorthand for rev^n..rev

2016-09-26 Thread Junio C Hamano
Vegard Nossum writes: > I often use rev^..rev to get all the commits in the branch that was merged > in by the merge commit 'rev' (including the merge itself). To save typing > (or copy-pasting, if the rev is long -- like a full SHA-1 or branch name) > we can make rev^-

[RFC PATCH v4] revision: new rev^-n shorthand for rev^n..rev

2016-09-26 Thread Vegard Nossum
I often use rev^..rev to get all the commits in the branch that was merged in by the merge commit 'rev' (including the merge itself). To save typing (or copy-pasting, if the rev is long -- like a full SHA-1 or branch name) we can make rev^- a shorthand for that. The existing syntax rev^! seems