Re: [PATCH 2/2] Improve the naming of guessed target repository for git clone

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

 



2009/5/14 Junio C Hamano <gitster@xxxxxxxxx>:
> Alex Riesen <raa.lkml@xxxxxxxxx> writes:
>> +     /* replace all 'control' characters with ascii space */
>> +     for (start = dir; *start; ++start)
>> +             if (*(const unsigned char *)start < 32u)
>> +                     dir[start - dir] = '\x20';
>
> What's this strange mixture of 32u and '\x20'?
>

Not sure myself. I probably wanted visibility, and somehow ended
up using different presentations.

>> +     /* remove trailing spaces */
>> +     if (dir < start)
>> +             for (end = start; dir < --end; )
>> +                     if (!isspace(*end))
>> +                             break;
>> +                     else
>> +                             dir[end - dir] = '\0';
>> +     return dir;
>>  }
>
> Honestly, I regret having asked if there was a 2/2 ;-)
>
> What's the point of this change, now that you have a fix in 1/2?  Who are
> you helping with this patch?
>

Without this the _automatically_ generated names for cloned repositories
have all the whitespace around them. As you cannot sanely depend on
automatically
generated names, I thought that making them simpler will make sense.

But I should complete the patch: remove heading whitespace, and replace
multiple spaces and control characters with one space.
--
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]