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
Junio C Hamano <gitster@pobox.com>
Date
Mar 21, 2019, 09:46 UTC
Message-ID
<xmqq7ecssgpc.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<87va0cd1zp.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 30 quoted lines
>     	graph_version = *(unsigned char*)(data + 4);
>     <<<<<<< HEAD
>     	if (!graph_version || graph_version > 2) {
>     		error(_("unsupported graph version %X"),
>     		      graph_version);
>     =======
>     	if (graph_version != GRAPH_VERSION) {
>     		error(_("commit-graph version %X does not match version %X"),
>     		      graph_version, 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());
>     >>>>>>> commit-graph-fix-segfault-and-exit-3
>     		return NULL;
>     	}
>
> Needs to be resolved as:
>
> 	graph_version = *(unsigned char*)(data + 4);
> 	if (!graph_version || graph_version > 2) {
> 		error(_("commit-graph the graph version %X is unsupported"),
> 		      graph_version);
> 		return NULL;
> 	}
>
> I.e. there's a test that greps out "graph version".
Yikes.

Given the common ancestor version's phrasing, and also the updated phrasing of the other message since we started supporting v2 of the commit-graph file, I resolved this message to

	 "unsupported commit-graph version %X"

instead. Of course, I wasn't expecting the test to be depending on the exact error message's phrasing X-<.

Thanks.
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 12 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.