Re: [PATCH] reset: allow "-" short hand for previous commit
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 3, 2015, 23:17 UTC
- Message-ID
- <xmqq1tl5acwu.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <vpq4mq13f69.fsf@anie.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 7 quoted lines
> Sudhanshu Shekhar <sudshekhar02@gmail.com> writes: > >> From: SudShekhar <sudshekhar02@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.
Actually, the token does not match either of the two names; it looks like two names smashed together into a single nickname token.
Show 8 quoted lines
>> builtin/reset.c | 2 ++
>
> Doesn't this deserve a test?
>
> + if(!strcmp(argv[0],"-"))
> + argv[0]="@{-1}";
>
> Wrong spacing (around = and after ,).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 means).