Re: [PATCH 11/53] fast-import: convert to struct object_id

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

 



On Sun, Apr 23, 2017 at 2:34 PM, brian m. carlson
<sandals@xxxxxxxxxxxxxxxxxxxx> wrote:
> Convert the remaining parts of fast-import.c to use struct object_id.
> Convert several instances of get_sha1_hex to parse_oid_hex to avoid
> needing to specify constants.  Convert other hardcoded values to named
> constants.  Finally, use the is_empty_tree_oid function instead of a
> direct comparison against a fixed string.
>
> Note that the odd computation with GIT_MAX_HEXSZ is due to the insertion
> of a slash between every two hex digits in the path, plus one for the
> terminating NUL.

Up to and including this patch are
Reviewed-by: Stefan Beller <sbeller@xxxxxxxxxx>

I may continue reviewing this series once my eyes are refreshed.

>
> Signed-off-by: brian m. carlson <sandals@xxxxxxxxxxxxxxxxxxxx>
> ---

> @@ -2823,12 +2821,10 @@ static void parse_new_commit(const char *arg)
>         strbuf_addf(&new_data, "tree %s\n",
>                 oid_to_hex(&b->branch_tree.versions[1].oid));
>         if (!is_null_oid(&b->oid))
> -               strbuf_addf(&new_data, "parent %s\n",
> -                           oid_to_hex(&b->oid));
> +               strbuf_addf(&new_data, "parent %s\n", oid_to_hex(&b->oid));
>         while (merge_list) {
>                 struct hash_list *next = merge_list->next;
> -               strbuf_addf(&new_data, "parent %s\n",
> -                           oid_to_hex(&merge_list->oid));
> +               strbuf_addf(&new_data, "parent %s\n", oid_to_hex(&merge_list->oid));
>                 free(merge_list);
>                 merge_list = next;
>         }

This is a funny one. The only change is line rewrapping, as it fits
into 80 cols easily.
I was reviewing this series using colored --word-diff output, and this hunk does
not produce any red or green. I wonder if this is the intended
behavior of the word diffing
or if we rather want to insert a <RED> - \n - </RED>.

Thanks,
Stefan



[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]