Re: [PATCH v5 1/2] reset: enable '-' short-hand for previous branch

2015-03-16 Thread Sudhanshu Shekhar
at git-bisect.sh and will try and come up with a proposal for review by the git community. Thank you all for you time and patience. Regards, Sudhanshu On Sat, Mar 14, 2015 at 2:18 AM, Eric Sunshine wrote: > On Fri, Mar 13, 2015 at 2:18 PM, Sudhanshu Shekhar > wrote: >> git reset '

Re: [PATCH v5 2/2] t7102: add 'reset -' tests

2015-03-16 Thread Sudhanshu Shekhar
Hi, On Sat, Mar 14, 2015 at 2:40 AM, Eric Sunshine wrote: > On Fri, Mar 13, 2015 at 2:18 PM, Sudhanshu Shekhar > wrote: >> Add following test cases: >> 1) Confirm error message when git reset is used with no previous branch >> 2) Confirm git reset - works like git r

[PATCH v5 2/2] t7102: add 'reset -' tests

2015-03-13 Thread Sudhanshu Shekhar
en when a file named @{-1} is present Helped-by: Eric Sunshine Helped-by: Matthieu Moy Helped-by: David Aguilar Signed-off-by: Sudhanshu Shekhar --- Eric: Thank you for pointing out the mistake. The '&&' after the Here Docs was causing the issue. I have removed the concatenation f

[PATCH v5 1/2] reset: enable '-' short-hand for previous branch

2015-03-13 Thread Sudhanshu Shekhar
Helped-by: Eric Sunshine Helped-by: Matthieu Moy Signed-off-by: Sudhanshu Shekhar --- I have changed the logic to ensure argv[0] isn't changed at any point. Creating a modified_argv0 variable let's me do that. I couldn't think of any other way to achieve this, apart from chang

[PATCH v3 1/2] reset: enable '-' short-hand for previous branch

2015-03-10 Thread Sudhanshu Shekhar
git reset -' will reset to the previous branch. It will behave similar to @{-1} except when a file named '@{-1}' is present. To refer to a file named '-', use ./- or the -- flag. Helped-by: Junio C Hamano Helped-by: Eric Sunshine Helped-by: Matthieu Moy Signed-

[PATCH v3 2/2] t7102: add 'reset -' tests

2015-03-10 Thread Sudhanshu Shekhar
en when a file named @{-1} is present Helped-by: Eric Sunshine Helped-by: Matthieu Moy Helped-by: David Aguilar Signed-off-by: Sudhanshu Shekhar --- First of all, thank you for being so incredibly patient and helpful. I am very grateful for your remarks and reviews. I have implemented your

[PATCH v3 1/2] reset: enable '-' short-hand for previous branch

2015-03-10 Thread Sudhanshu Shekhar
git reset -' will reset to the previous branch. It will behave similar to @{-1} except when a file named '@{-1}' is present. To refer to a file named '-', use ./- or the -- flag. Helped-by: Junio C Hamano Helped-by: Eric Sunshine Helped-by: Matthieu Moy Signed-

Re: [PATCH v3 2/2] Added tests for reset -

2015-03-10 Thread Sudhanshu Shekhar
Hi, On Tue, Mar 10, 2015 at 6:56 PM, Matthieu Moy wrote: > Sudhanshu Shekhar writes: > >> +test_expect_success 'reset - while having file named - and no previous >> branch' ' > > I like having the expected behavior in the test name too. e.g. add > &qu

[PATCH v3 2/2] Added tests for reset -

2015-03-10 Thread Sudhanshu Shekhar
quot; works normally even when a file named @{-1} is present Helped-by: David Aguilar Signed-off-by: Sudhanshu Shekhar --- I have tried to keep each test self sufficient. Please let me know if any changes are required. Thank you! t/t7102-reset.sh | 139 ++

[PATCH v3 1/2] reset: enable '-' short-hand for previous branch

2015-03-10 Thread Sudhanshu Shekhar
'git reset -' will reset to the previous branch. It will behave similar to @{-1} except when a file named '@{-1}' is present. To refer to a file named '-', use ./- or the -- flag. Helped-by: Junio C Hamano Helped-by: Eric Sunshine Helped-by: Matthieu Moy Si

Re: [PATCH v2 1/2] Teach reset the same short-hand as checkout

2015-03-10 Thread Sudhanshu Shekhar
Hi, On Tue, Mar 10, 2015 at 8:04 AM, Junio C Hamano wrote: > Sudhanshu Shekhar writes: > >> "-" now means the previous branch. >> >> Signed-off-by: Sudhanshu Shekhar >> Thanks-to: Eric Sunshine, Junio C Hamano, Matthieu Moy >> --- > > >

[PATCH v2 2/2] Added test cases for git reset -

2015-03-09 Thread Sudhanshu Shekhar
1) Confirm error message when git reset is used with no previous branch 2) Confirm git reset - works like git reset @{-1} 3) Confirm "-" is always treated as a commit unless the -- file option is specified Signed-off-by: Sudhanshu Shekhar Thanks-to: David Aguilar --- David, thank yo

[PATCH v2 1/2] Teach reset the same short-hand as checkout

2015-03-09 Thread Sudhanshu Shekhar
"-" now means the previous branch. Signed-off-by: Sudhanshu Shekhar Thanks-to: Eric Sunshine, Junio C Hamano, Matthieu Moy --- builtin/reset.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/builtin/reset.c b/builtin/reset.c index 4c08ddc..02f33ef 10

[PATCH 2/2] Added test cases for git reset -

2015-03-08 Thread Sudhanshu Shekhar
and - is always treated either as a previous branch or a bad filename. Users who wish to reset a file named '-' should specify it as './-' Signed-off-by: Sudhanshu Shekhar --- I have created test cases for git reset -. @Junio, I tried incorporating your suggestions while develop

[PATCH 1/2] Teach reset the same short-hand as checkout

2015-03-08 Thread Sudhanshu Shekhar
"-" now means the previous branch. Signed-off-by: Sudhanshu Shekhar Thanks-to: Junio C Hamano, Matthieu Moy, Eric Sunshine --- Thank you all for your feedback. Please let me know if I am missing out on anything else. builtin/reset.c | 9 - 1 file changed, 8 insertions(+),

[PATCH 1/2] reset: allow "-" short hand for previous commit

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

[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 --- 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 writes: > >> Sudhanshu Shekhar writes: >> >>> From: SudShekhar >> >> 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

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

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