git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 7/8] Provide API access to init_db()
Date: Sun, 27 Apr 2008 15:01:21 -0700	[thread overview]
Message-ID: <7vr6crdkjy.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LNX.1.00.0804271305000.19665@iabervon.org> (Daniel Barkalow's message of "Sun, 27 Apr 2008 13:39:27 -0400 (EDT)")

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);
> ...


> +	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..

  reply	other threads:[~2008-04-27 22:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27 17:39 [PATCH 7/8] Provide API access to init_db() Daniel Barkalow
2008-04-27 22:01 ` Junio C Hamano [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-04-17 23:32 Daniel Barkalow
2008-04-19 18:11 ` Johan Herland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vr6crdkjy.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).