Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages

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

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:

> On Fri, May 8, 2015 at 12:53 PM, Ralf Thielow <ralf.thielow@xxxxxxxxx> wrote:
>> sequencer.c: abbreviate hashs placed in the middle of messages
>
> s/hashs/hashes/

Thanks

>
>> Printing a 40 character sha1 hash in the middle of a message
>> stretches the sentence a lot. Print the abbreviated version
>> instead.
>>
>> Signed-off-by: Ralf Thielow <ralf.thielow@xxxxxxxxx>
>> ---
>> diff --git a/sequencer.c b/sequencer.c
>> index c4f4b7d..2a39ab6 100644
>> --- a/sequencer.c
>> +++ b/sequencer.c
>> @@ -498,20 +498,21 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
>>                 struct commit_list *p;
>>
>>                 if (!opts->mainline)
>> -                       return error(_("Commit %s is a merge but no -m option was given."),
>> -                               sha1_to_hex(commit->object.sha1));
>> +                       return error(_("Commit %s... is a merge but no -m option was given."),
>> +                               find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));
>
> Are short SHA1's followed by "..." anywhere else in the project? It
> seems strange to introduce such usage here.
>

Yes, that's why I used it.
--
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]