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

Re: [PATCH 7/8] Provide API access to init_db()

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 27, 2008, 22:01 UTC
Message-ID
<7vr6crdkjy.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LNX.1.00.0804271305000.19665@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
> ...
> +		 * PERM_EVERYBODY.
> +		 */
> +		sprintf(buf, "%d", shared_repository);
This line is superfluous (no need to send amended patch).
> +		if (shared_repository == PERM_GROUP)
> +			sprintf(buf, "%d", OLD_PERM_GROUP);
> ...
Show 10 quoted lines
> +	if (is_bare_repository_cfg < 0)
> +		is_bare_repository_cfg = guess_repository_type(git_dir);
> +
> +	if (!is_bare_repository_cfg) {
> +		if (git_dir) {
> +			const char *git_dir_parent = strrchr(git_dir, '/');
> +			if (git_dir_parent) {
> +				char *rel = xstrndup(git_dir, git_dir_parent - git_dir);
> +				git_work_tree_cfg = xstrdup(make_absolute_path(rel));
> +				free(rel);
Good change to plug a leak and make the code easier to read..
Previous: Daniel Barkalow
Message 2 of 2 in “Provide API access to init_db()”
  1. 7/8 Provide API access to init_db()Daniel Barkalow, Apr 27, 2008
  2. Junio C HamanoApr 27, 2008

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.