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

Re: [PATCH] pack-objects.c: Initialize read mutex in cmd_pack_objects

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 22, 2019, 23:05 UTC
Message-ID
<xmqqwomwcmyt.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190118022736.36832-1-phogg@novamoon.net>
Patrick Hogg <phogg@novamoon.net> writes:
Show 15 quoted lines
> @@ -3319,6 +3327,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
>  		OPT_END(),
>  	};
>  
> +	init_read_mutex();
> +
>  	if (DFS_NUM_STATES > (1 << OE_DFS_STATE_BITS))
>  		BUG("too many dfs states, increase OE_DFS_STATE_BITS");
>  
> @@ -3495,5 +3505,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
>  			   _("Total %"PRIu32" (delta %"PRIu32"),"
>  			     " reused %"PRIu32" (delta %"PRIu32")"),
>  			   written, written_delta, reused, reused_delta);
> +
> +	cleanup_read_mutex();

This is insufficient, isn't it? There is "return 0" just above the pre-context of this hunk which should probably be made to "goto clean_exit" or something, with a new label "clean_exit:" just in front of this new call to cleaup.

>  	return 0;
>  }
Previous: Johannes SchindelinNext: Patrick Hogg
Message 4 of 7 in “pack-objects.c: Initialize read mutex in cmd_pack_objects”
  1. pack-objects.c: Initialize read mutex in cmd_pack_objectsPatrick Hogg, Jan 18, 2019
  2. Duy NguyenJan 18, 2019
  3. Johannes SchindelinJan 18, 2019
  4. Junio C HamanoJan 22, 2019
  5. Fwd: [PATCH] pack-objects.c: Initialize read mutex in cmd_pack_objectsPatrick Hogg, Jan 18, 2019
  6. Duy NguyenJan 18, 2019
  7. Patrick HoggJan 19, 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.