Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:32

Daniel Barkalow [off-list ref] 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..
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help