Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-03 Thread Michael Haggerty
On 03/02/2014 04:55 PM, Matthieu Moy wrote: Eric Sunshine sunsh...@sunshineco.com writes: On Sun, Mar 2, 2014 at 3:53 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sat, Mar 1, 2014 at 9:53 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: This is rev-list style, where people can do

Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-03 Thread Matthieu Moy
Michael Haggerty mhag...@alum.mit.edu writes: Or perhaps -NUM should fail with an error message if any of the last NUM commits are merges. In that restricted scenario (which probably accounts for 99% of rebases), -NUM is equivalent to HEAD~NUM. Makes sense to me. So, -NUM would actually mean

Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-03 Thread Duy Nguyen
On Mon, Mar 3, 2014 at 4:37 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Michael Haggerty mhag...@alum.mit.edu writes: Or perhaps -NUM should fail with an error message if any of the last NUM commits are merges. In that restricted scenario (which probably accounts for 99% of

Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-03 Thread Matthieu Moy
Duy Nguyen pclo...@gmail.com writes: On Mon, Mar 3, 2014 at 4:37 PM, Matthieu Moy This would actually be a feature for me: I often want to rebase recent enough history, and when my @{upstream} isn't well positionned, I randomly type HEAD~N without remembering what N should be. When N is too

Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-03 Thread Jeff King
On Mon, Mar 03, 2014 at 10:37:11AM +0100, Matthieu Moy wrote: Michael Haggerty mhag...@alum.mit.edu writes: Or perhaps -NUM should fail with an error message if any of the last NUM commits are merges. In that restricted scenario (which probably accounts for 99% of rebases), -NUM is

Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-03 Thread David Kastrup
Duy Nguyen pclo...@gmail.com writes: On Mon, Mar 3, 2014 at 4:37 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Michael Haggerty mhag...@alum.mit.edu writes: Or perhaps -NUM should fail with an error message if any of the last NUM commits are merges. In that restricted scenario

Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-03 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: This might be a reason that -NUM is a bad idea. Or perhaps -NUM should fail with an error message if any of the last NUM commits are merges. In that restricted scenario (which probably accounts for 99% of rebases), -NUM is equivalent to

Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-03 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Michael Haggerty mhag...@alum.mit.edu writes: Or perhaps -NUM should fail with an error message if any of the last NUM commits are merges. In that restricted scenario (which probably accounts for 99% of rebases), -NUM is equivalent to

Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-03 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@grenoble-inp.fr writes: Michael Haggerty mhag...@alum.mit.edu writes: Or perhaps -NUM should fail with an error message if any of the last NUM commits are merges. In that restricted scenario (which probably accounts for

Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-02 Thread Eric Sunshine
On Sat, Mar 1, 2014 at 9:53 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: This is rev-list style, where people can do git rev-list -3 in addition to git rev-list HEAD~3. A lot of commands are driven by the revision machinery and also accept this form. This addition to rebase is just for

Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-02 Thread Duy Nguyen
On Sun, Mar 2, 2014 at 3:37 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sat, Mar 1, 2014 at 9:53 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: This is rev-list style, where people can do git rev-list -3 in addition to git rev-list HEAD~3. A lot of commands are driven by the

Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-02 Thread Eric Sunshine
On Sat, Mar 1, 2014 at 9:53 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: This is rev-list style, where people can do git rev-list -3 in addition to git rev-list HEAD~3. A lot of commands are driven by the revision machinery and also accept this form. This addition to rebase is just for

Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-02 Thread Eric Sunshine
On Sun, Mar 2, 2014 at 3:53 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sat, Mar 1, 2014 at 9:53 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: This is rev-list style, where people can do git rev-list -3 in addition to git rev-list HEAD~3. A lot of commands are driven by the

Re: [PATCH 2/3] rebase: accept -number as another way of saying HEAD~number

2014-03-02 Thread Matthieu Moy
Eric Sunshine sunsh...@sunshineco.com writes: On Sun, Mar 2, 2014 at 3:53 AM, Eric Sunshine sunsh...@sunshineco.com wrote: On Sat, Mar 1, 2014 at 9:53 PM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: This is rev-list style, where people can do git rev-list -3 in addition to git rev-list