Matthieu Moy writes:
> I would agree with "more strict" is it was about rejecting the input (to
> catch errors), but here we're still accepting it without complaining
Yes, by "more strict", I meant that I would prefer to keep things we
do not understand as intact as possible, while transforming
Junio C Hamano writes:
> In any case, I wouldn't have much time during the remainder of the
> day to requeue and/or comment; please check what I push out on 'pu'.
BTW, I do agree with this hunk:
@@ -1068,18 +1064,20 @@ static void abbrev_sha1_in_line(struct strbuf *line)
static void read_rebas
Junio C Hamano writes:
> Matthieu Moy writes:
>
>> Actually, we can do simpler: we still have the original line available,
>> ...
>>
>> I took this (modulo s/line.len[0]/line.buf[0]/, and s/rtrim/trim/ to be
>> robust to leading whitespace (not really important, but doesn't harm).
>
> I'd prefer
Matthieu Moy writes:
> Actually, we can do simpler: we still have the original line available,
> ...
>
> I took this (modulo s/line.len[0]/line.buf[0]/, and s/rtrim/trim/ to be
> robust to leading whitespace (not really important, but doesn't harm).
I'd prefer us to be more strict when we know w
Junio C Hamano writes:
> Matthieu Moy writes:
>
>> +strbuf_trim(split[1]);
>> +if (!get_sha1(split[1]->buf, sha1)) {
>> +abbrev = find_unique_abbrev(sha1, DEFAULT_ABBREV);
>> +strbuf_reset(split[1]);
>> +strbuf_a
On Wed, Jul 1, 2015 at 12:36 PM, Junio C Hamano wrote:
> Eric Sunshine writes:
>
>> I was about to mention the same shortcoming, but you beat me to it.
>>
>>> Perhaps be more strict and do this instead (without
>>> leading strbuf_trim):
>>>
>>> if (!get_sha1_hex(split[1]->buf, sha1) &&
>>
Eric Sunshine writes:
> I was about to mention the same shortcoming, but you beat me to it.
>
>> Perhaps be more strict and do this instead (without
>> leading strbuf_trim):
>>
>> if (!get_sha1_hex(split[1]->buf, sha1) &&
>> !strcmp(split[1]->buf + 40, " ") {
>>
On Wed, Jul 1, 2015 at 12:18 PM, Junio C Hamano wrote:
> Matthieu Moy writes:
>> +/*
>> + * Turn
>> + * pick d6a2f0303e897ec257dd0e0a39a5ccb709bc2047 some message
>> + * into
>> + * pick d6a2f03 some message
>> + */
>> +static void abbrev_sha1_in_line(struct strbuf *line)
>> +{
>> + struct st
Matthieu Moy writes:
> +/*
> + * Turn
> + * pick d6a2f0303e897ec257dd0e0a39a5ccb709bc2047 some message
> + * into
> + * pick d6a2f03 some message
> + */
> +static void abbrev_sha1_in_line(struct strbuf *line)
> +{
> + struct strbuf **split;
> + int i;
> +
> + if (starts_with(line->buf
9 matches
Mail list logo