Re: [PATCH] reset: allow - short hand for previous commit

2015-03-04 Thread Junio C Hamano
Sudhanshu Shekhar sudshekha...@gmail.com writes: What should worry us even more is what the user would get when @{-1} does not resolve to something the command can use. It would be bad if we give an error message with @{-1} in it that the user never typed (and may not even understand what it

[PATCH] reset: allow - short hand for previous commit

2015-03-03 Thread Sudhanshu Shekhar
From: SudShekhar sudshekha...@gmail.com Teach reset the same shorthand as checkout and merge. - means the previous commit. Signed-off-by: Sudhanshu Shekhar sudshekha...@gmail.com --- This is done as a microproject for gsoc purposes. I am looking forward to your feedback/comments. Thanks

Re: [PATCH] reset: allow - short hand for previous commit

2015-03-03 Thread Matthieu Moy
Sudhanshu Shekhar sudshekha...@gmail.com writes: From: SudShekhar sudshekha...@gmail.com Please, set your configuration to have the same identity for commit and send-email. It seems your commiter ID (user.name) does not contain your last name. builtin/reset.c | 2 ++ Doesn't this deserve a

Re: [PATCH] reset: allow - short hand for previous commit

2015-03-03 Thread Eric Sunshine
On Wed, Mar 4, 2015 at 2:07 AM, Sudhanshu Shekhar sudshekha...@gmail.com wrote: Matthieu Moy matthieu@grenoble-inp.fr writes: Sudhanshu Shekhar sudshekha...@gmail.com writes: From: SudShekhar sudshekha...@gmail.com + if(!strcmp(argv[0],-)) + argv[0]=@{-1};

[PATCH] reset: allow - short hand for previous commit

2015-03-03 Thread Sudhanshu Shekhar
Teach reset the same shorthand as checkout and merge. - means the previous commit. Signed-off-by: Sudhanshu Shekhar sudshekha...@gmail.com --- builtin/reset.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/builtin/reset.c b/builtin/reset.c index 4c08ddc..9f8967d

Re: [PATCH] reset: allow - short hand for previous commit

2015-03-03 Thread Sudhanshu Shekhar
Hi, Matthieu Moy matthieu@grenoble-inp.fr writes: Sudhanshu Shekhar sudshekha...@gmail.com writes: From: SudShekhar sudshekha...@gmail.com Please, set your configuration to have the same identity for commit and send-email. It seems your commiter ID (user.name) does not contain your

Re: [PATCH] reset: allow - short hand for previous commit

2015-03-03 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Sudhanshu Shekhar sudshekha...@gmail.com writes: From: SudShekhar sudshekha...@gmail.com Please, set your configuration to have the same identity for commit and send-email. It seems your commiter ID (user.name) does not contain your last