diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-02-01 15:52:27 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-02-01 22:22:51 -0800 |
commit | 54a15a8df269315adf7110a87391bd5bef7e90f0 (patch) | |
tree | 0e8eecd785ddbfa5e19c681e3bbf19a7611d4a9c /sha1_file.c | |
parent | Cleanup prepare_packed_git_one to reuse install_packed_git. (diff) | |
download | tgif-54a15a8df269315adf7110a87391bd5bef7e90f0.tar.xz |
Correct comment in prepare_packed_git_one.
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>
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c index a42f94ac94..29c260cf65 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -779,7 +779,7 @@ static void prepare_packed_git_one(char *objdir, int local) 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)) @@ -787,6 +787,9 @@ static void prepare_packed_git_one(char *objdir, int local) } 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; |