git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Mar 8, 2015, 10:33 UTC
Message-ID
<vpqioeb22y8.fsf@anie.imag.fr>
In-Reply-To
<1425762244-8629-1-git-send-email-sudshekhar02@gmail.com>
Sudhanshu Shekhar <sudshekhar02@gmail.com> writes:
> +		if(!strcmp(argv[0], "-")) {
[...]
Show 10 quoted lines
> diff --git a/builtin/reset.c b/builtin/reset.c
> index 9f8967d..02f33ef 100644
> --- a/builtin/reset.c
> +++ b/builtin/reset.c
> @@ -206,7 +206,7 @@ static void parse_args(struct pathspec *pathspec,
>  	 */
>  
>  	if (argv[0]) {
> -		if(!strcmp(argv[0], "-")) {
> +		if (!strcmp(argv[0], "-")) {

Please, squash this hunk into the previous patch, so that reviewers get the right version right away.

Also, send each patch as a separate email (git send-email can do that for you).

> +	test_must_fail git reset - 2> output &&
Here and elsewhere: no space after >.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Sudhanshu ShekharNext: Sudhanshu Shekhar
Message 9 of 12 in “reset: allow "-" short hand for previous commit”
  1. reset: allow "-" short hand for previous commitSudhanshu Shekhar, Mar 3, 2015
  2. Matthieu MoyMar 3, 2015
  3. Junio C HamanoMar 3, 2015
  4. Sudhanshu ShekharMar 4, 2015
  5. reset: allow "-" short hand for previous commitSudhanshu Shekhar, Mar 4, 2015
  6. Eric SunshineMar 4, 2015
  7. Junio C HamanoMar 5, 2015
  8. 1/2 reset: allow "-" short hand for previous commitSudhanshu Shekhar, Mar 7, 2015
  9. Matthieu MoyMar 8, 2015
  10. 1/2 Teach reset the same short-hand as checkoutSudhanshu Shekhar, Mar 8, 2015
  11. 2/2 Added test cases for git reset -Sudhanshu Shekhar, Mar 8, 2015
  12. David AguilarMar 8, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.