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