git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: What's cooking in git.git (Mar 2019, #04; Wed, 20)

From
Duy Nguyen <pclouds@gmail.com>
Date
Mar 21, 2019, 11:14 UTC
Message-ID
<CACsJy8DgNzGK3g2P7ZyRmd7sbiSOXY07KqYEh-gSsPkEZ+D5Qw@mail.gmail.com>
In-Reply-To
<87sgvgcy3o.fsf@evledraar.gmail.com>

On Thu, Mar 21, 2019 at 5:37 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 17 quoted lines
> 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.

Show 13 quoted lines
> +                       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
Previous: Ævar Arnfjörð Bjarmason
Message 14 of 14 in “What's cooking in git.git (Mar 2019, #04; Wed, 20)”
  1. Junio C HamanoMar 20, 2019
  2. Junio C HamanoMar 20, 2019
  3. Thomas GummererMar 20, 2019
  4. Rohit AshiwalMar 20, 2019
  5. Thomas GummererMar 20, 2019
  6. Rohit AshiwalMar 20, 2019
  7. Junio C HamanoMar 21, 2019
  8. Ævar Arnfjörð BjarmasonMar 20, 2019
  9. Junio C HamanoMar 21, 2019
  10. Junio C HamanoMar 21, 2019
  11. Ævar Arnfjörð BjarmasonMar 21, 2019
  12. Junio C HamanoMar 21, 2019
  13. Ævar Arnfjörð BjarmasonMar 21, 2019
  14. Duy NguyenMar 21, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.