From: Junio C Hamano Date: Sun, 27 Apr 2008 22:01:21 GMT Subject: Re: [PATCH 7/8] Provide API access to init_db() Message-ID: <7vr6crdkjy.fsf@gitster.siamese.dyndns.org> In-Reply-To: Daniel Barkalow 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..