On Thu, Mar 21, 2019 at 5:37 PM Ævar Arnfjörð Bjarmason
<[email protected]> wrote:
> diff --git a/commit-graph.c b/commit-graph.c
> index b2f64790aa..28b5b599ee 100644
> --- a/commit-graph.c
> +++ b/commit-graph.c
> @@ -155,14 +155,8 @@ struct commit_graph *parse_commit_graph(void *graph_map, 
> int fd,
>
>         graph_version = *(unsigned char*)(data + 4);
>         if (!graph_version || graph_version > 2) {
> -               error(_("unsupported commit-graph version %X"), 
> graph_version);
> -               return NULL;
> -       }
> -
> -       hash_version = *(unsigned char*)(data + 5);
> -       if (hash_version != oid_version()) {
> -               error(_("commit-graph hash version %X does not match version 
> %X"),
> -                     hash_version, oid_version());
> +               error(_("commit-graph the graph version %X is unsupported"),

Slightly off-topic, but it does not seem to be a good idea to use %X
here, on a user-visible message, without any indication that it's a
hexadecimal number. %d would do, or just put 0x%X.

> +                       graph_version);
>                 return NULL;
>         }
>
> @@ -172,7 +166,7 @@ struct commit_graph *parse_commit_graph(void *graph_map, 
> int fd,
>         case 1:
>                 hash_version = *(unsigned char*)(data + 5);
>                 if (hash_version != oid_version()) {
> -                       error(_("hash version %X does not match version %X"),
> +                       error(_("commit-graph hash version %X does not match 
> version %X"),
>                               hash_version, oid_version());
>                         return NULL;
>                 }



-- 
Duy

Reply via email to