summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 625e942)
raw | patch | inline | side by side (parent: 625e942)
author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 1 Feb 2007 20:52:27 +0000 (15:52 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 2 Feb 2007 06:22:51 +0000 (22:22 -0800) |
After staring at the comment and the associated for loop, I
realized the comment was completely bogus. The section of
code its talking about is trying to avoid duplicate mapping
of the same packfile.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
realized the comment was completely bogus. The section of
code its talking about is trying to avoid duplicate mapping
of the same packfile.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c | patch | blob | history |
diff --git a/sha1_file.c b/sha1_file.c
index a42f94ac94fac2186cbcb0eed395ea3befd8fced..29c260cf65927792f6562f8896d6da20c9d06eb6 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
if (!has_extension(de->d_name, ".idx"))
continue;
- /* we have .idx. Is it a file we can map? */
+ /* Don't reopen a pack we already have. */
strcpy(path + len, de->d_name);
for (p = packed_git; p; p = p->next) {
if (!memcmp(path, p->pack_name, len + namelen - 4))
}
if (p)
continue;
+ /* See if it really is a valid .idx file with corresponding
+ * .pack file that we can map.
+ */
p = add_packed_git(path, len + namelen, local);
if (!p)
continue;