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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> writes:
>
>> Sudhanshu Shekhar <sudshekhar02@xxxxxxxxx> writes:
>>
>>> From: SudShekhar <sudshekhar02@xxxxxxxxx>
>>
>> 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.

Sorry, I had set my irc nick as the commiter id. I have changed this to my name.

>>> builtin/reset.c | 2 ++
>>
>> Doesn't this deserve a test?
>>
>> +             if(!strcmp(argv[0],"-"))
>> +                     argv[0]="@{-1}";
>>
>> Wrong spacing (around = and after ,).

Thanks for pointing this out. I have corrected it.

> 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).


I apologize for having overlooked this use case. I have made some
changes and I think this should work now. I will email the updated
patch in the next email (I hope this is the correct procedure). Please
let me know your thoughts.
Also, this use case hasn't been handled in the case of git merge.

Another thing, can someone guide me regarding the right place to add a
test case? Should it be t7102-reset.sh or some other file?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]