summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f7991d1)
raw | patch | inline | side by side (parent: f7991d1)
author | Brandon Casey <casey@nrlssc.navy.mil> | |
Wed, 12 Nov 2008 17:59:07 +0000 (11:59 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 12 Nov 2008 18:28:14 +0000 (10:28 -0800) |
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-gc.c | patch | blob | history |
diff --git a/builtin-gc.c b/builtin-gc.c
index fac200e0b08360625afc81b02913128c9b87f486..53a0d43b679889dd8659fa6bdd6007f2a5967cc5 100644 (file)
--- a/builtin-gc.c
+++ b/builtin-gc.c
prepare_packed_git();
for (cnt = 0, p = packed_git; p; p = p->next) {
- char path[PATH_MAX];
- size_t len;
- int keep;
-
if (!p->pack_local)
continue;
- len = strlen(p->pack_name);
- if (PATH_MAX <= len + 1)
- continue; /* oops, give up */
- memcpy(path, p->pack_name, len-5);
- memcpy(path + len - 5, ".keep", 6);
- keep = access(p->pack_name, F_OK) && (errno == ENOENT);
- if (keep)
+ if (p->pack_keep)
continue;
/*
* Perhaps check the size of the pack and count only