Skip to contentSkip to conversation

Cleanup prepare_packed_git_one to reuse install_packed_git.

PATCH In review Shawn O. Pearce 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 Cleanup prepare_packed_git_one to reuse install_packed_git.

There is little point in having the linked list insertion code appearing in install_packed_git, and then again just 30 lines further down in the same file.

---
 sha1_file.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
sha1_file.c +1 -2
index 498665e..a42f94a 100644
@@ -790,8 +790,7 @@ static void prepare_packed_git_one(char *objdir, int local)
 		p = add_packed_git(path, len + namelen, local);
 		if (!p)
 			continue;
-		p->next = packed_git;
-		packed_git = p;
+		install_packed_git(p);
 	}
 	closedir(dir);
 }
Signature · 1 line
1.5.0.rc3.1.ge4b0e