{"thread":{"id":"18062","subject":"[PATCH 6/6] is_kept_pack(): final clean-up","startedAt":"2009-02-28T09:15:05Z","lastAt":"2009-03-20T04:05:15Z","messageCount":17,"participants":["Junio C Hamano","Kjetil Barvik","Brandon Casey"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"106521","messageId":"cover.1235812035.git.gitster@pobox.com","threadId":"18062","inReplyTo":"alpine.LFD.2.00.0902191318310.21686@localhost.localdomain","subject":"[PATCH 0/6] \"git repack -a -d\" improvements","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-28T09:15:05Z","receivedAt":"2009-02-28T09:15:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This is series removes the linear search in \"ignore_packed\" list when \"git\nrepack -a -d\" is run to consolidate many packfiles that are not marked to\nbe kept with \".keep\".  It is oversplit for easier review; in the final\nform, I think it should be two patch series, 1/6 and the rest.\n\nThe current mechanism is to pass the name of packfiles that are not marked\nto be kept with --unpacked= command line option.  This list is used to a\nfew internal functions to pretend as if the objects found in named packs\nexist in loose form and subject to repacking.  This look-up is linear and\nfound to be very inefficient.\n\n[1/6] is a preparatory and an unrelated bugfix to git-repack script.\n\n[2/6] refactors public interface has_sha1_pack() that takes an optional\n\"ignore_packed\" list.  Most callers pass NULL, so it introduces a new\nfunction has_sha1_kept_pack() and migrate the minority caller to this\ninterface while losing the argument from the original function and callers\nthat currently pass NULL.\n\n[3/6] temporarily makes the the extra argument to has_sha1_kept_pack()\nfunction to pass \"ignore_packed\" list from a list of char* to a pointer to\nstruct rev_info, solely to make the refactoring done in [4/6] easier to\nfollow.  Most of the effects of this patch will be removed at the end.\n\n[4/6] identifies three places that use \"ignore_packed\" list to tell if a\npack is on the list or not, and introduces a helper function to do so.\nThe helper is conveniently called is_kept_pack(), even though at this\nstage the list does not necessarily mean a list of \"unkept\" packs yet.\n\n[5/6] removes --unpacked=<packfile> parameter, and adds --kept-pack-only\noption.  The sole user of --unpacked=<packfile>, git-repack, is updated to\npass this option instead of listing the \"unkept\" packfiles on the command\nline.\n\n[6/6] reverts most of the effects of [3/6] made solely for reviewability\nand removes is_kept_pack() helper function, which now is merely a lookup\nof a structure member \"p->pack_keep\".\n\nI think we probably could get rid of --honor-pack-keep mechanism after\nthis series, but I didn't look very deeply into it.\n\nJunio C Hamano (6):\n  git-repack: resist stray environment variable\n  has_sha1_pack(): refactor \"pretend these packs do not exist\"\n    interface\n  has_sha1_kept_pack(): take \"struct rev_info\"\n  Consolidate ignore_packed logic more\n  Simplify is_kept_pack()\n  is_kept_pack(): final clean-up\n\n builtin-count-objects.c |    2 +-\n builtin-fsck.c          |    2 +-\n builtin-pack-objects.c  |   14 ++--------\n builtin-prune-packed.c  |    2 +-\n cache.h                 |    4 +-\n diff.c                  |    2 +-\n git-repack.sh           |    6 ++++-\n revision.c              |   25 +++++++------------\n revision.h              |    6 +---\n sha1_file.c             |   60 ++++++++++++++++++++--------------------------\n 10 files changed, 51 insertions(+), 72 deletions(-)\n"},{"id":"106522","messageId":"2478dc84b5fb2617bfab3a8f65f1270de578b94a.1235812035.git.gitster@pobox.com","threadId":"18062","inReplyTo":"cover.1235812035.git.gitster@pobox.com","subject":"[PATCH 1/6] git-repack: resist stray environment variable","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-28T09:15:06Z","receivedAt":"2009-02-28T09:15:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The script used $args and $existing without initializing it to empty.  It\nwould have been confused by an environment variable the end user had\nbefore running it.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n git-repack.sh |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-repack.sh b/git-repack.sh\nindex 458a497..8600015 100755\n--- a/git-repack.sh\n+++ b/git-repack.sh\n@@ -60,6 +60,7 @@ case \",$all_into_one,\" in\n \targs='--unpacked --incremental'\n \t;;\n ,t,)\n+\targs= existing=\n \tif [ -d \"$PACKDIR\" ]; then\n \t\tfor e in `cd \"$PACKDIR\" && find . -type f -name '*.pack' \\\n \t\t\t| sed -e 's/^\\.\\///' -e 's/\\.pack$//'`\n-- \n1.6.2.rc2.99.g9f3bb\n"},{"id":"106523","messageId":"cd673c1f17228d272c4b7f81fbb28bc31cf0cac6.1235812035.git.gitster@pobox.com","threadId":"18062","inReplyTo":"cover.1235812035.git.gitster@pobox.com","subject":"[PATCH 2/6] has_sha1_pack(): refactor \"pretend these packs do not exist\" interface","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-28T09:15:07Z","receivedAt":"2009-02-28T09:15:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Most of the callers of this function except only one pass NULL to its last\nparameter, ignore_packed.\n\nIntroduce has_sha1_kept_pack() function that has the function signature\nand the semantics of this function, and convert the sole caller that does\nnot pass NULL to call this new function.\n\nAll other callers and has_sha1_pack() lose the ignore_packed parameter.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin-count-objects.c |    2 +-\n builtin-fsck.c          |    2 +-\n builtin-prune-packed.c  |    2 +-\n cache.h                 |    3 ++-\n diff.c                  |    2 +-\n revision.c              |    3 ++-\n sha1_file.c             |   32 +++++++++++++++++++++++++-------\n 7 files changed, 33 insertions(+), 13 deletions(-)\n\ndiff --git a/builtin-count-objects.c b/builtin-count-objects.c\nindex 91b5487..c095e8d 100644\n--- a/builtin-count-objects.c\n+++ b/builtin-count-objects.c\n@@ -61,7 +61,7 @@ static void count_objects(DIR *d, char *path, int len, int verbose,\n \t\thex[40] = 0;\n \t\tif (get_sha1_hex(hex, sha1))\n \t\t\tdie(\"internal error\");\n-\t\tif (has_sha1_pack(sha1, NULL))\n+\t\tif (has_sha1_pack(sha1))\n \t\t\t(*packed_loose)++;\n \t}\n }\ndiff --git a/builtin-fsck.c b/builtin-fsck.c\nindex 30971ce..491375d 100644\n--- a/builtin-fsck.c\n+++ b/builtin-fsck.c\n@@ -158,7 +158,7 @@ static void check_reachable_object(struct object *obj)\n \t * do a full fsck\n \t */\n \tif (!obj->parsed) {\n-\t\tif (has_sha1_pack(obj->sha1, NULL))\n+\t\tif (has_sha1_pack(obj->sha1))\n \t\t\treturn; /* it is in pack - forget about it */\n \t\tprintf(\"missing %s %s\\n\", typename(obj->type), sha1_to_hex(obj->sha1));\n \t\terrors_found |= ERROR_REACHABLE;\ndiff --git a/builtin-prune-packed.c b/builtin-prune-packed.c\nindex 10cb8df..2d5b2cd 100644\n--- a/builtin-prune-packed.c\n+++ b/builtin-prune-packed.c\n@@ -23,7 +23,7 @@ static void prune_dir(int i, DIR *dir, char *pathname, int len, int opts)\n \t\tmemcpy(hex+2, de->d_name, 38);\n \t\tif (get_sha1_hex(hex, sha1))\n \t\t\tcontinue;\n-\t\tif (!has_sha1_pack(sha1, NULL))\n+\t\tif (!has_sha1_pack(sha1))\n \t\t\tcontinue;\n \t\tmemcpy(pathname + len, de->d_name, 38);\n \t\tif (opts & DRY_RUN)\ndiff --git a/cache.h b/cache.h\nindex 42f2f27..c1539bf 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -565,7 +565,8 @@ extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned l\n \n extern int move_temp_to_file(const char *tmpfile, const char *filename);\n \n-extern int has_sha1_pack(const unsigned char *sha1, const char **ignore);\n+extern int has_sha1_pack(const unsigned char *sha1);\n+extern int has_sha1_kept_pack(const unsigned char *sha1, const char **ignore);\n extern int has_sha1_file(const unsigned char *sha1);\n extern int has_loose_object_nonlocal(const unsigned char *sha1);\n \ndiff --git a/diff.c b/diff.c\nindex f91f256..a34d26c 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1743,7 +1743,7 @@ static int reuse_worktree_file(const char *name, const unsigned char *sha1, int\n \t * objects however would tend to be slower as they need\n \t * to be individually opened and inflated.\n \t */\n-\tif (!FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))\n+\tif (!FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1))\n \t\treturn 0;\n \n \tlen = strlen(name);\ndiff --git a/revision.c b/revision.c\nindex 45fd7a3..746eeed 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -1485,7 +1485,8 @@ enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit)\n {\n \tif (commit->object.flags & SHOWN)\n \t\treturn commit_ignore;\n-\tif (revs->unpacked && has_sha1_pack(commit->object.sha1, revs->ignore_packed))\n+\tif (revs->unpacked &&\n+\t    has_sha1_kept_pack(commit->object.sha1, revs->ignore_packed))\n \t\treturn commit_ignore;\n \tif (revs->show_all)\n \t\treturn commit_show;\ndiff --git a/sha1_file.c b/sha1_file.c\nindex 88035a0..ac4375d 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -1874,7 +1874,8 @@ int matches_pack_name(struct packed_git *p, const char *name)\n \treturn 0;\n }\n \n-static int find_pack_entry(const unsigned char *sha1, struct pack_entry *e, const char **ignore_packed)\n+static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,\n+\t\t\t const char **ignore_packed)\n {\n \tstatic struct packed_git *last_found = (void *)1;\n \tstruct packed_git *p;\n@@ -1934,6 +1935,17 @@ static int find_pack_entry(const unsigned char *sha1, struct pack_entry *e, cons\n \treturn 0;\n }\n \n+static int find_pack_entry(const unsigned char *sha1, struct pack_entry *e)\n+{\n+\treturn find_pack_ent(sha1, e, NULL);\n+}\n+\n+static int find_kept_pack_entry(const unsigned char *sha1, struct pack_entry *e,\n+\t\t\t\tconst char **ignore_packed)\n+{\n+\treturn find_pack_ent(sha1, e, ignore_packed);\n+}\n+\n struct packed_git *find_sha1_pack(const unsigned char *sha1,\n \t\t\t\t  struct packed_git *packs)\n {\n@@ -1975,7 +1987,7 @@ int sha1_object_info(const unsigned char *sha1, unsigned long *sizep)\n \tstruct pack_entry e;\n \tint status;\n \n-\tif (!find_pack_entry(sha1, &e, NULL)) {\n+\tif (!find_pack_entry(sha1, &e)) {\n \t\t/* Most likely it's a loose object. */\n \t\tstatus = sha1_loose_object_info(sha1, sizep);\n \t\tif (status >= 0)\n@@ -1983,7 +1995,7 @@ int sha1_object_info(const unsigned char *sha1, unsigned long *sizep)\n \n \t\t/* Not a loose object; someone else may have just packed it. */\n \t\treprepare_packed_git();\n-\t\tif (!find_pack_entry(sha1, &e, NULL))\n+\t\tif (!find_pack_entry(sha1, &e))\n \t\t\treturn status;\n \t}\n \treturn packed_object_info(e.p, e.offset, sizep);\n@@ -1995,7 +2007,7 @@ static void *read_packed_sha1(const unsigned char *sha1,\n \tstruct pack_entry e;\n \tvoid *data;\n \n-\tif (!find_pack_entry(sha1, &e, NULL))\n+\tif (!find_pack_entry(sha1, &e))\n \t\treturn NULL;\n \tdata = cache_or_unpack_entry(e.p, e.offset, size, type, 1);\n \tif (!data) {\n@@ -2395,17 +2407,23 @@ int has_pack_file(const unsigned char *sha1)\n \treturn 1;\n }\n \n-int has_sha1_pack(const unsigned char *sha1, const char **ignore_packed)\n+int has_sha1_pack(const unsigned char *sha1)\n+{\n+\tstruct pack_entry e;\n+\treturn find_pack_entry(sha1, &e);\n+}\n+\n+int has_sha1_kept_pack(const unsigned char *sha1, const char **ignore_packed)\n {\n \tstruct pack_entry e;\n-\treturn find_pack_entry(sha1, &e, ignore_packed);\n+\treturn find_kept_pack_entry(sha1, &e, ignore_packed);\n }\n \n int has_sha1_file(const unsigned char *sha1)\n {\n \tstruct pack_entry e;\n \n-\tif (find_pack_entry(sha1, &e, NULL))\n+\tif (find_pack_entry(sha1, &e))\n \t\treturn 1;\n \treturn has_loose_object(sha1);\n }\n-- \n1.6.2.rc2.99.g9f3bb\n"},{"id":"106524","messageId":"b8431b033f9e60f87a75b864612873307a3e5966.1235812035.git.gitster@pobox.com","threadId":"18062","inReplyTo":"cover.1235812035.git.gitster@pobox.com","subject":"[PATCH 3/6] has_sha1_kept_pack(): take \"struct rev_info\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-28T09:15:08Z","receivedAt":"2009-02-28T09:15:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Its \"ignore_packed\" parameter always comes from struct rev_info.  This\npatch makes the function take a pointer to the surrounding structure, so\nthat the refactoring in the next patch becomes easier to review.\n\nThere is an unfortunate header file dependency and the easiest workaround\nis to temporarily move the function declaration from cache.h to\nrevision.h; this will be moved back to cache.h once the function loses\nthis \"ignore_packed\" parameter altogether in the later part of the\nseries.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n cache.h     |    1 -\n revision.c  |    2 +-\n revision.h  |    2 ++\n sha1_file.c |   16 +++++++++-------\n 4 files changed, 12 insertions(+), 9 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex c1539bf..8e43f38 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -566,7 +566,6 @@ extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned l\n extern int move_temp_to_file(const char *tmpfile, const char *filename);\n \n extern int has_sha1_pack(const unsigned char *sha1);\n-extern int has_sha1_kept_pack(const unsigned char *sha1, const char **ignore);\n extern int has_sha1_file(const unsigned char *sha1);\n extern int has_loose_object_nonlocal(const unsigned char *sha1);\n \ndiff --git a/revision.c b/revision.c\nindex 746eeed..795e0c0 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -1486,7 +1486,7 @@ enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit)\n \tif (commit->object.flags & SHOWN)\n \t\treturn commit_ignore;\n \tif (revs->unpacked &&\n-\t    has_sha1_kept_pack(commit->object.sha1, revs->ignore_packed))\n+\t    has_sha1_kept_pack(commit->object.sha1, revs))\n \t\treturn commit_ignore;\n \tif (revs->show_all)\n \t\treturn commit_show;\ndiff --git a/revision.h b/revision.h\nindex 91f1944..9304296 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -158,4 +158,6 @@ enum commit_action {\n \n extern enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit);\n \n+extern int has_sha1_kept_pack(const unsigned char *sha1, const struct rev_info *);\n+\n #endif\ndiff --git a/sha1_file.c b/sha1_file.c\nindex ac4375d..f963c3c 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -16,6 +16,8 @@\n #include \"refs.h\"\n #include \"pack-revindex.h\"\n #include \"sha1-lookup.h\"\n+#include \"diff.h\"\n+#include \"revision.h\"\n \n #ifndef O_NOATIME\n #if defined(__linux__) && (defined(__i386__) || defined(__PPC__))\n@@ -1875,7 +1877,7 @@ int matches_pack_name(struct packed_git *p, const char *name)\n }\n \n static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,\n-\t\t\t const char **ignore_packed)\n+\t\t\t const struct rev_info *revs)\n {\n \tstatic struct packed_git *last_found = (void *)1;\n \tstruct packed_git *p;\n@@ -1887,9 +1889,9 @@ static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,\n \tp = (last_found == (void *)1) ? packed_git : last_found;\n \n \tdo {\n-\t\tif (ignore_packed) {\n+\t\tif (revs->ignore_packed) {\n \t\t\tconst char **ig;\n-\t\t\tfor (ig = ignore_packed; *ig; ig++)\n+\t\t\tfor (ig = revs->ignore_packed; *ig; ig++)\n \t\t\t\tif (matches_pack_name(p, *ig))\n \t\t\t\t\tbreak;\n \t\t\tif (*ig)\n@@ -1941,9 +1943,9 @@ static int find_pack_entry(const unsigned char *sha1, struct pack_entry *e)\n }\n \n static int find_kept_pack_entry(const unsigned char *sha1, struct pack_entry *e,\n-\t\t\t\tconst char **ignore_packed)\n+\t\t\t\tconst struct rev_info *revs)\n {\n-\treturn find_pack_ent(sha1, e, ignore_packed);\n+\treturn find_pack_ent(sha1, e, revs);\n }\n \n struct packed_git *find_sha1_pack(const unsigned char *sha1,\n@@ -2413,10 +2415,10 @@ int has_sha1_pack(const unsigned char *sha1)\n \treturn find_pack_entry(sha1, &e);\n }\n \n-int has_sha1_kept_pack(const unsigned char *sha1, const char **ignore_packed)\n+int has_sha1_kept_pack(const unsigned char *sha1, const struct rev_info *revs)\n {\n \tstruct pack_entry e;\n-\treturn find_kept_pack_entry(sha1, &e, ignore_packed);\n+\treturn find_kept_pack_entry(sha1, &e, revs);\n }\n \n int has_sha1_file(const unsigned char *sha1)\n-- \n1.6.2.rc2.99.g9f3bb\n"},{"id":"106525","messageId":"386cb77210cdb09cd808698d21d0e796cd77f26f.1235812035.git.gitster@pobox.com","threadId":"18062","inReplyTo":"cover.1235812035.git.gitster@pobox.com","subject":"[PATCH 4/6] Consolidate ignore_packed logic more","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-28T09:15:09Z","receivedAt":"2009-02-28T09:15:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This refactors three loops that check if a given packfile is on the\nignore_packed list into a function is_kept_pack().  The function returns\nfalse for a pack on the list, and true for a pack not on the list, because\nthis list is solely used by \"git repack\" to pass list of packfiles that do\nnot have corresponding .keep files, i.e. a packfile not on the list is\n\"kept\".\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin-pack-objects.c |   12 ++----------\n cache.h                |    1 -\n revision.h             |    1 +\n sha1_file.c            |   24 ++++++++++++++----------\n 4 files changed, 17 insertions(+), 21 deletions(-)\n\ndiff --git a/builtin-pack-objects.c b/builtin-pack-objects.c\nindex fb5e14d..7e7719b 100644\n--- a/builtin-pack-objects.c\n+++ b/builtin-pack-objects.c\n@@ -1915,11 +1915,7 @@ static void add_objects_in_unpacked_packs(struct rev_info *revs)\n \t\tconst unsigned char *sha1;\n \t\tstruct object *o;\n \n-\t\tfor (i = 0; i < revs->num_ignore_packed; i++) {\n-\t\t\tif (matches_pack_name(p, revs->ignore_packed[i]))\n-\t\t\t\tbreak;\n-\t\t}\n-\t\tif (revs->num_ignore_packed <= i)\n+\t\tif (is_kept_pack(p, revs))\n \t\t\tcontinue;\n \t\tif (open_pack_index(p))\n \t\t\tdie(\"cannot open pack index\");\n@@ -1955,11 +1951,7 @@ static void loosen_unused_packed_objects(struct rev_info *revs)\n \tconst unsigned char *sha1;\n \n \tfor (p = packed_git; p; p = p->next) {\n-\t\tfor (i = 0; i < revs->num_ignore_packed; i++) {\n-\t\t\tif (matches_pack_name(p, revs->ignore_packed[i]))\n-\t\t\t\tbreak;\n-\t\t}\n-\t\tif (revs->num_ignore_packed <= i)\n+\t\tif (is_kept_pack(p, revs))\n \t\t\tcontinue;\n \n \t\tif (open_pack_index(p))\ndiff --git a/cache.h b/cache.h\nindex 8e43f38..23c16d0 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -747,7 +747,6 @@ extern void *unpack_entry(struct packed_git *, off_t, enum object_type *, unsign\n extern unsigned long unpack_object_header_gently(const unsigned char *buf, unsigned long len, enum object_type *type, unsigned long *sizep);\n extern unsigned long get_size_from_delta(struct packed_git *, struct pack_window **, off_t);\n extern const char *packed_object_info_detail(struct packed_git *, off_t, unsigned long *, unsigned long *, unsigned int *, unsigned char *);\n-extern int matches_pack_name(struct packed_git *p, const char *name);\n \n /* Dumb servers support */\n extern int update_server_info(int);\ndiff --git a/revision.h b/revision.h\nindex 9304296..af414e5 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -159,5 +159,6 @@ enum commit_action {\n extern enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit);\n \n extern int has_sha1_kept_pack(const unsigned char *sha1, const struct rev_info *);\n+extern int is_kept_pack(const struct packed_git *, const struct rev_info *);\n \n #endif\ndiff --git a/sha1_file.c b/sha1_file.c\nindex f963c3c..6e0a462 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -1858,7 +1858,7 @@ off_t find_pack_entry_one(const unsigned char *sha1,\n \treturn 0;\n }\n \n-int matches_pack_name(struct packed_git *p, const char *name)\n+static int matches_pack_name(const struct packed_git *p, const char *name)\n {\n \tconst char *last_c, *c;\n \n@@ -1876,6 +1876,17 @@ int matches_pack_name(struct packed_git *p, const char *name)\n \treturn 0;\n }\n \n+int is_kept_pack(const struct packed_git *p, const struct rev_info *revs)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < revs->num_ignore_packed; i++) {\n+\t\tif (matches_pack_name(p, revs->ignore_packed[i]))\n+\t\t\treturn 0;\n+\t}\n+\treturn 1;\n+}\n+\n static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,\n \t\t\t const struct rev_info *revs)\n {\n@@ -1889,15 +1900,8 @@ static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,\n \tp = (last_found == (void *)1) ? packed_git : last_found;\n \n \tdo {\n-\t\tif (revs->ignore_packed) {\n-\t\t\tconst char **ig;\n-\t\t\tfor (ig = revs->ignore_packed; *ig; ig++)\n-\t\t\t\tif (matches_pack_name(p, *ig))\n-\t\t\t\t\tbreak;\n-\t\t\tif (*ig)\n-\t\t\t\tgoto next;\n-\t\t}\n-\n+\t\tif (revs->ignore_packed && !is_kept_pack(p, revs))\n+\t\t\tgoto next;\n \t\tif (p->num_bad_objects) {\n \t\t\tunsigned i;\n \t\t\tfor (i = 0; i < p->num_bad_objects; i++)\n-- \n1.6.2.rc2.99.g9f3bb\n"},{"id":"106520","messageId":"03a9683d22eca52bc2b2b9b09258a143e76416f6.1235812035.git.gitster@pobox.com","threadId":"18062","inReplyTo":"cover.1235812035.git.gitster@pobox.com","subject":"[PATCH 5/6] Simplify is_kept_pack()","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-28T09:15:10Z","receivedAt":"2009-02-28T09:15:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This removes --unpacked=<packfile> parameter from the revision parser, and\nrewrites its use in git-repack to pass a single --kept-pack-only option\ninstead.\n\nThe new --kept-pack-only option means just that.  When this option is\ngiven, is_kept_pack() that used to say \"not on the --unpacked=<packfile>\nlist\" now says \"the packfile has corresponding .keep file\".\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin-pack-objects.c |    6 +++---\n git-repack.sh          |    5 ++++-\n revision.c             |   20 +++++---------------\n revision.h             |    8 +++-----\n sha1_file.c            |   30 +++---------------------------\n 5 files changed, 18 insertions(+), 51 deletions(-)\n\ndiff --git a/builtin-pack-objects.c b/builtin-pack-objects.c\nindex 7e7719b..150258b 100644\n--- a/builtin-pack-objects.c\n+++ b/builtin-pack-objects.c\n@@ -1915,7 +1915,7 @@ static void add_objects_in_unpacked_packs(struct rev_info *revs)\n \t\tconst unsigned char *sha1;\n \t\tstruct object *o;\n \n-\t\tif (is_kept_pack(p, revs))\n+\t\tif (is_kept_pack(p))\n \t\t\tcontinue;\n \t\tif (open_pack_index(p))\n \t\t\tdie(\"cannot open pack index\");\n@@ -1951,7 +1951,7 @@ static void loosen_unused_packed_objects(struct rev_info *revs)\n \tconst unsigned char *sha1;\n \n \tfor (p = packed_git; p; p = p->next) {\n-\t\tif (is_kept_pack(p, revs))\n+\t\tif (is_kept_pack(p))\n \t\t\tcontinue;\n \n \t\tif (open_pack_index(p))\n@@ -2149,7 +2149,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)\n \t\t\tcontinue;\n \t\t}\n \t\tif (!strcmp(\"--unpacked\", arg) ||\n-\t\t    !prefixcmp(arg, \"--unpacked=\") ||\n+\t\t    !strcmp(\"--kept-pack-only\", arg) ||\n \t\t    !strcmp(\"--reflog\", arg) ||\n \t\t    !strcmp(\"--all\", arg)) {\n \t\t\tuse_internal_rev_list = 1;\ndiff --git a/git-repack.sh b/git-repack.sh\nindex 8600015..a736009 100755\n--- a/git-repack.sh\n+++ b/git-repack.sh\n@@ -68,10 +68,13 @@ case \",$all_into_one,\" in\n \t\t\tif [ -e \"$PACKDIR/$e.keep\" ]; then\n \t\t\t\t: keep\n \t\t\telse\n-\t\t\t\targs=\"$args --unpacked=$e.pack\"\n \t\t\t\texisting=\"$existing $e\"\n \t\t\tfi\n \t\tdone\n+\t\tif test -n \"$existing\"\n+\t\tthen\n+\t\t\targs=\"--kept-pack-only\"\n+\t\tfi\n \t\tif test -n \"$args\" -a -n \"$unpack_unreachable\" -a \\\n \t\t\t-n \"$remove_redundant\"\n \t\tthen\ndiff --git a/revision.c b/revision.c\nindex 795e0c0..3cfd653 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -963,16 +963,6 @@ static void add_message_grep(struct rev_info *revs, const char *pattern)\n \tadd_grep(revs, pattern, GREP_PATTERN_BODY);\n }\n \n-static void add_ignore_packed(struct rev_info *revs, const char *name)\n-{\n-\tint num = ++revs->num_ignore_packed;\n-\n-\trevs->ignore_packed = xrealloc(revs->ignore_packed,\n-\t\t\t\t       sizeof(const char *) * (num + 1));\n-\trevs->ignore_packed[num-1] = name;\n-\trevs->ignore_packed[num] = NULL;\n-}\n-\n static int handle_revision_opt(struct rev_info *revs, int argc, const char **argv,\n \t\t\t       int *unkc, const char **unkv)\n {\n@@ -1072,12 +1062,12 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg\n \t\trevs->edge_hint = 1;\n \t} else if (!strcmp(arg, \"--unpacked\")) {\n \t\trevs->unpacked = 1;\n-\t\tfree(revs->ignore_packed);\n-\t\trevs->ignore_packed = NULL;\n-\t\trevs->num_ignore_packed = 0;\n-\t} else if (!prefixcmp(arg, \"--unpacked=\")) {\n+\t\trevs->kept_pack_only = 0;\n+\t} else if (!strcmp(arg, \"--kept-pack-only\")) {\n \t\trevs->unpacked = 1;\n-\t\tadd_ignore_packed(revs, arg+11);\n+\t\trevs->kept_pack_only = 1;\n+\t} else if (!prefixcmp(arg, \"--unpacked=\")) {\n+\t\tdie(\"--unpacked=<packfile> no longer supported.\");\n \t} else if (!strcmp(arg, \"-r\")) {\n \t\trevs->diff = 1;\n \t\tDIFF_OPT_SET(&revs->diffopt, RECURSIVE);\ndiff --git a/revision.h b/revision.h\nindex af414e5..f63596f 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -47,7 +47,8 @@ struct rev_info {\n \t\t\tblob_objects:1,\n \t\t\tedge_hint:1,\n \t\t\tlimited:1,\n-\t\t\tunpacked:1, /* see also ignore_packed below */\n+\t\t\tunpacked:1,\n+\t\t\tkept_pack_only:1,\n \t\t\tboundary:2,\n \t\t\tleft_right:1,\n \t\t\trewrite_parents:1,\n@@ -75,9 +76,6 @@ struct rev_info {\n \t\t\tmissing_newline:1;\n \tenum date_mode date_mode;\n \n-\tconst char **ignore_packed; /* pretend objects in these are unpacked */\n-\tint num_ignore_packed;\n-\n \tunsigned int\tabbrev;\n \tenum cmit_fmt\tcommit_format;\n \tstruct log_info *loginfo;\n@@ -159,6 +157,6 @@ enum commit_action {\n extern enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit);\n \n extern int has_sha1_kept_pack(const unsigned char *sha1, const struct rev_info *);\n-extern int is_kept_pack(const struct packed_git *, const struct rev_info *);\n+extern int is_kept_pack(const struct packed_git *);\n \n #endif\ndiff --git a/sha1_file.c b/sha1_file.c\nindex 6e0a462..e8a9517 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -1858,33 +1858,9 @@ off_t find_pack_entry_one(const unsigned char *sha1,\n \treturn 0;\n }\n \n-static int matches_pack_name(const struct packed_git *p, const char *name)\n+int is_kept_pack(const struct packed_git *p)\n {\n-\tconst char *last_c, *c;\n-\n-\tif (!strcmp(p->pack_name, name))\n-\t\treturn 1;\n-\n-\tfor (c = p->pack_name, last_c = c; *c;)\n-\t\tif (*c == '/')\n-\t\t\tlast_c = ++c;\n-\t\telse\n-\t\t\t++c;\n-\tif (!strcmp(last_c, name))\n-\t\treturn 1;\n-\n-\treturn 0;\n-}\n-\n-int is_kept_pack(const struct packed_git *p, const struct rev_info *revs)\n-{\n-\tint i;\n-\n-\tfor (i = 0; i < revs->num_ignore_packed; i++) {\n-\t\tif (matches_pack_name(p, revs->ignore_packed[i]))\n-\t\t\treturn 0;\n-\t}\n-\treturn 1;\n+\treturn p->pack_keep;\n }\n \n static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,\n@@ -1900,7 +1876,7 @@ static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,\n \tp = (last_found == (void *)1) ? packed_git : last_found;\n \n \tdo {\n-\t\tif (revs->ignore_packed && !is_kept_pack(p, revs))\n+\t\tif (revs->kept_pack_only && !is_kept_pack(p))\n \t\t\tgoto next;\n \t\tif (p->num_bad_objects) {\n \t\t\tunsigned i;\n-- \n1.6.2.rc2.99.g9f3bb\n"},{"id":"106519","messageId":"69e020ae00ebd3f7ae3c2f35acb139361417ef64.1235812035.git.gitster@pobox.com","threadId":"18062","inReplyTo":"cover.1235812035.git.gitster@pobox.com","subject":"[PATCH 6/6] is_kept_pack(): final clean-up","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-28T09:15:11Z","receivedAt":"2009-02-28T09:15:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Now is_kept_pack() is just a member lookup into a structure, we can write\nit as such.\n\nAlso rewrite the sole caller of has_sha1_kept_pack() to switch on the\ncriteria the callee uses (namely, revs->kept_pack_only) between calling\nhas_sha1_kept_pack() and has_sha1_pack(), so that these two callees do not\nhave to take a pointer to struct rev_info as an argument.\n\nThis removes the header file dependency issue temporarily introduced by\nthe earlier commit, so we revert changes associated to that as well.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin-pack-objects.c |    4 ++--\n cache.h                |    1 +\n revision.c             |    4 +++-\n revision.h             |    3 ---\n sha1_file.c            |   22 +++++++---------------\n 5 files changed, 13 insertions(+), 21 deletions(-)\n\ndiff --git a/builtin-pack-objects.c b/builtin-pack-objects.c\nindex 150258b..b2e4626 100644\n--- a/builtin-pack-objects.c\n+++ b/builtin-pack-objects.c\n@@ -1915,7 +1915,7 @@ static void add_objects_in_unpacked_packs(struct rev_info *revs)\n \t\tconst unsigned char *sha1;\n \t\tstruct object *o;\n \n-\t\tif (is_kept_pack(p))\n+\t\tif (p->pack_keep)\n \t\t\tcontinue;\n \t\tif (open_pack_index(p))\n \t\t\tdie(\"cannot open pack index\");\n@@ -1951,7 +1951,7 @@ static void loosen_unused_packed_objects(struct rev_info *revs)\n \tconst unsigned char *sha1;\n \n \tfor (p = packed_git; p; p = p->next) {\n-\t\tif (is_kept_pack(p))\n+\t\tif (p->pack_keep)\n \t\t\tcontinue;\n \n \t\tif (open_pack_index(p))\ndiff --git a/cache.h b/cache.h\nindex 23c16d0..0a3d523 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -566,6 +566,7 @@ extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned l\n extern int move_temp_to_file(const char *tmpfile, const char *filename);\n \n extern int has_sha1_pack(const unsigned char *sha1);\n+extern int has_sha1_kept_pack(const unsigned char *sha1);\n extern int has_sha1_file(const unsigned char *sha1);\n extern int has_loose_object_nonlocal(const unsigned char *sha1);\n \ndiff --git a/revision.c b/revision.c\nindex 3cfd653..6d8ac46 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -1476,7 +1476,9 @@ enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit)\n \tif (commit->object.flags & SHOWN)\n \t\treturn commit_ignore;\n \tif (revs->unpacked &&\n-\t    has_sha1_kept_pack(commit->object.sha1, revs))\n+\t    (revs->kept_pack_only\n+\t     ? has_sha1_kept_pack(commit->object.sha1)\n+\t     : has_sha1_pack(commit->object.sha1)))\n \t\treturn commit_ignore;\n \tif (revs->show_all)\n \t\treturn commit_show;\ndiff --git a/revision.h b/revision.h\nindex f63596f..b9fa9c2 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -156,7 +156,4 @@ enum commit_action {\n \n extern enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit);\n \n-extern int has_sha1_kept_pack(const unsigned char *sha1, const struct rev_info *);\n-extern int is_kept_pack(const struct packed_git *);\n-\n #endif\ndiff --git a/sha1_file.c b/sha1_file.c\nindex e8a9517..7ead56c 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -16,8 +16,6 @@\n #include \"refs.h\"\n #include \"pack-revindex.h\"\n #include \"sha1-lookup.h\"\n-#include \"diff.h\"\n-#include \"revision.h\"\n \n #ifndef O_NOATIME\n #if defined(__linux__) && (defined(__i386__) || defined(__PPC__))\n@@ -1858,13 +1856,8 @@ off_t find_pack_entry_one(const unsigned char *sha1,\n \treturn 0;\n }\n \n-int is_kept_pack(const struct packed_git *p)\n-{\n-\treturn p->pack_keep;\n-}\n-\n static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,\n-\t\t\t const struct rev_info *revs)\n+\t\t\t int kept_pack_only)\n {\n \tstatic struct packed_git *last_found = (void *)1;\n \tstruct packed_git *p;\n@@ -1876,7 +1869,7 @@ static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,\n \tp = (last_found == (void *)1) ? packed_git : last_found;\n \n \tdo {\n-\t\tif (revs->kept_pack_only && !is_kept_pack(p))\n+\t\tif (kept_pack_only && !p->pack_keep)\n \t\t\tgoto next;\n \t\tif (p->num_bad_objects) {\n \t\t\tunsigned i;\n@@ -1919,13 +1912,12 @@ static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,\n \n static int find_pack_entry(const unsigned char *sha1, struct pack_entry *e)\n {\n-\treturn find_pack_ent(sha1, e, NULL);\n+\treturn find_pack_ent(sha1, e, 0);\n }\n \n-static int find_kept_pack_entry(const unsigned char *sha1, struct pack_entry *e,\n-\t\t\t\tconst struct rev_info *revs)\n+static int find_kept_pack_entry(const unsigned char *sha1, struct pack_entry *e)\n {\n-\treturn find_pack_ent(sha1, e, revs);\n+\treturn find_pack_ent(sha1, e, 1);\n }\n \n struct packed_git *find_sha1_pack(const unsigned char *sha1,\n@@ -2395,10 +2387,10 @@ int has_sha1_pack(const unsigned char *sha1)\n \treturn find_pack_entry(sha1, &e);\n }\n \n-int has_sha1_kept_pack(const unsigned char *sha1, const struct rev_info *revs)\n+int has_sha1_kept_pack(const unsigned char *sha1)\n {\n \tstruct pack_entry e;\n-\treturn find_kept_pack_entry(sha1, &e, revs);\n+\treturn find_kept_pack_entry(sha1, &e);\n }\n \n int has_sha1_file(const unsigned char *sha1)\n-- \n1.6.2.rc2.99.g9f3bb\n"},{"id":"106527","messageId":"8663iuwxrb.fsf@broadpark.no","threadId":"18062","inReplyTo":"cover.1235812035.git.gitster@pobox.com","subject":"Re: [PATCH 0/6] \"git repack -a -d\" improvements","fromName":"Kjetil Barvik","fromEmail":"barvik@broadpark.no","sentAt":"2009-02-28T12:29:12Z","receivedAt":"2009-02-28T12:29:12Z","isPatch":true,"sender":{"key":"barvik@broadpark.no","avatar":null},"body":"* Junio C Hamano <gitster@pobox.com> writes:\n| [2/6] refactors public interface has_sha1_pack() that takes an optional\n| \"ignore_packed\" list.  Most callers pass NULL, so it introduces a new\n| function has_sha1_kept_pack() and migrate the minority caller to this\n| interface while losing the argument from the original function and callers\n| that currently pass NULL.\n  [...]\n| [4/6] identifies three places that use \"ignore_packed\" list to tell if a\n| pack is on the list or not, and introduces a helper function to do so.\n| The helper is conveniently called is_kept_pack(), even though at this\n| stage the list does not necessarily mean a list of \"unkept\" packs yet.\n\n  OK, patch 2/6 failed for me when I was doing 'git am' to import the\n  patch-series, so sorry if do not see all bits of the patch correctly.\n\n  Would it be an improvment to change the signature of the currently\n  find_sha1_pack() function to:\n\n    struct packed_git *\n    find_pack_entry(const unsigned char *sha1, off_t *sha1_pack_offset,\n                    struct packed_git *packs)\n\n    - The currently existing 'struct pack_entry *e' parameter is only\n      used to retrn the offset, so make it more clear.  The struct\n      pack_entry can probably be deleted from the sha1_file.c file.\n\n    - When the 'git repack -a -d' command is used, one has to compute\n      the list of allowed pack-files to look into, and give this list to\n      find_pack_entry().\n\n    - The currently named find_sha1_pack() function can then be deleted.\n\n    - For example, when this function is now used in sha1_object_info()\n      it can be called like this:\n\n          found_pack = find_pack_entry(sha1, &offset, packed_git);\n\n  -- kjetil\n"},{"id":"106544","messageId":"7vfxhyfohx.fsf@gitster.siamese.dyndns.org","threadId":"18062","inReplyTo":"8663iuwxrb.fsf@broadpark.no","subject":"Re: [PATCH 0/6] \"git repack -a -d\" improvements","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-28T17:41:14Z","receivedAt":"2009-02-28T17:41:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Kjetil Barvik <barvik@broadpark.no> writes:\n\n>   OK, patch 2/6 failed for me when I was doing 'git am' to import the\n>   patch-series, so sorry if do not see all bits of the patch correctly.\n\nAh, I should have mentioned that the series was meant to apply to v1.6.0.6\n(and merged upwards).\n\nI am off to dentist so I won't have time to think about below until I get\nback.\n\n>   Would it be an improvment to change the signature of the currently\n>   find_sha1_pack() function to:\n>\n>     struct packed_git *\n>     find_pack_entry(const unsigned char *sha1, off_t *sha1_pack_offset,\n>                     struct packed_git *packs)\n>\n>     - The currently existing 'struct pack_entry *e' parameter is only\n>       used to retrn the offset, so make it more clear.  The struct\n>       pack_entry can probably be deleted from the sha1_file.c file.\n>\n>     - When the 'git repack -a -d' command is used, one has to compute\n>       the list of allowed pack-files to look into, and give this list to\n>       find_pack_entry().\n>\n>     - The currently named find_sha1_pack() function can then be deleted.\n>\n>     - For example, when this function is now used in sha1_object_info()\n>       it can be called like this:\n>\n>           found_pack = find_pack_entry(sha1, &offset, packed_git);\n>\n>   -- kjetil\n"},{"id":"108417","messageId":"EblkEXbcYUWby1OEDup9n0l6lbwNL-4-jyt02Cjab2pqLqekAUji0w@cipher.nrlssc.navy.mil","threadId":"18062","inReplyTo":"7Vazs5mFk91IKAarOd0wrBNmYj7eSJxVIcR0PEQxJl8R0aQmQDEqSJMphMrXhmVu570fijupQ34@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] t7700-repack: repack -a now works properly, expect success from test","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-03-18T20:59:02Z","receivedAt":"2009-03-18T20:59:02Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Brandon Casey wrote:\n> Since Junio's keep-pack series was merged in at aec81306, git-repack now\n> properly packs objects from alternate repositories even when the local\n> repository contains packs.\n> \n> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>\n> ---\n> \n> \n> Well, I finally got some time last week to take a look at this issue, and\n> what do I find, but you've already fixed it.  Did you even realize? :)\n> \n> \n> I was too busy to notice the emails on the subject last month...\n> \n> http://article.gmane.org/gmane.comp.version-control.git/111758\n> \n> Junio C Hamano wrote:\n>> I think we probably could get rid of --honor-pack-keep mechanism after\n>> this series, but I didn't look very deeply into it.\n> \n> This makes sense, but doesn't seem to be working.  Possibly the way\n>  --kept-pack-only is implemented, it only deals with commits.  So if the\n> commit object is _not_ in a kept pack, but the trees and/or blobs that it\n> references _are_, then both the commit and the trees/blobs will be added to\n> the list of objects to pack even though the trees/blobs should not be.\n> \n> The test in t7700 is contrived, and creates two pack files; one marked with\n> .keep which contains a single blob object that is missing from the other.\n> Then the test repacks and checks whether the blob object was placed into the\n> new pack.  The --honor-pack-keep mechanism handles this case since it works\n> on the back end and checks whether each object that is added to the objects\n> list exists in a kept pack, and skips it if so.\n> \n> Disclaimer: I have not taken the time to fully understand revision.c\n\nHmm, I think there are a couple of new issues.\n\n  1) The --kept-pack-only mechanism does not operate solely on \"local\"\n     packs now.  This means that objects residing in an alternate pack\n     which has a .keep file will not be repacked with repack -a.  My\n     current opinion is that .keep files in an alternate object database\n     should not be honored since the user may not have any control over\n     them.  This seems to be in line with your statement about this feature\n     affecting locally existing packs from the Release Notes:\n\n       git-gc spent excessive amount of time to decide if an object appears\n       in a locally existing pack\n\n  2) The 'repack unpacked objects' and 'loosen unpacked objects' mechanisms\n     now do not operate solely on local packs.  I think this means that\n     objects residing in alternate not-kept packs will be repacked when\n     '-A -d' is used, and will be loosened when '-a -d' is used.\n\n\nI have a test for #1 above. I'll think about a test for #2.\n\nI wonder if we'll ever be interested in non-local keep files?  If not, then\nwhy not set pack_keep _only_ for local packs?\n\ndiff --git a/sha1_file.c b/sha1_file.c\nindex 4563173..a595eac 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -881,9 +881,11 @@ struct packed_git *add_packed_git(const char *path, int pat\n        }\n        memcpy(p->pack_name, path, path_len);\n \n-       strcpy(p->pack_name + path_len, \".keep\");\n-       if (!access(p->pack_name, F_OK))\n-               p->pack_keep = 1;\n+       if (local) {\n+               strcpy(p->pack_name + path_len, \".keep\");\n+               if (!access(p->pack_name, F_OK))\n+                       p->pack_keep = 1;\n+       }\n \n        strcpy(p->pack_name + path_len, \".pack\");\n        if (stat(p->pack_name, &st) || !S_ISREG(st.st_mode)) {\n\n\nI'd also change the name from pack_keep to something that identivies it as local.\n\nThe alternative would require that find_pack_ent() differentiate between\nlocal kept packs and alternate kept packs.\n\n-brandon\n"},{"id":"108645","messageId":"t_s5aa51o2kq_ePRWgLTEkVg4HqH1dQa6_mVq4djPPG4Vxylm2hNqmx7fPC2W5AsfcXg83DYbGc@cipher.nrlssc.navy.mil","threadId":"18062","inReplyTo":"EblkEXbcYUWby1OEDup9n0l6lbwNL-4-jyt02Cjab2pqLqekAUji0w@cipher.nrlssc.navy.mil","subject":"[PATCH 0/5] repack improvements","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-03-20T03:47:49Z","receivedAt":"2009-03-20T03:47:49Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"\nAs I mentioned in a previous email, the recent changes to\npack-objects/rev-list partially fixed one repacking flaw, but introduced 2\nothers.  There were actually two emails, but the first one never made it\nto the list.\n\nThere existed a flaw that prevented repack from properly repacking objects\ncontained in packs from alternate repositories if the local repository\ncontained any non-kept packs.  This was fixed by the --kept-pack-only feature,\nin exchange for not being able to pack objects contained in alternate packs\nwhich had a keep file.  Since the user may not have control over the referenced\nobject database, I think it is fair not to the honor the keep files in that\ncase.\n\nAdditionally, if repack told pack-objects to loosen unreferenced objects,\nit would even loosen objects residing in alternate packs.  They would then be\nimmediately deleted by the call to prune-packed though.\n\nThe solution I chose is actually to fall back to the --honor-pack-keep option\nand to stop using the --kept-pack-only option.  pack-objects already iterates\nover every object added for packing and searches the pack array to check\nwhether it is already packed, so for the case where no keep files are used,\nthere is actually one less iteration through the pack array for each commit.\nBut one more (?) for each object referenced by a commit that is packed in a\npack with a .keep file.\n\nSo this keeps the local and keep_pack decision making in pack-objects.  The\nother way would be to move the --local option over into rev-list and teach\nthe pack lookup machinery to differentiate between local and non-local packs.\nNot sure which is better, but this was easier.\n\nI think there is still one case where an object will be loosened unnecessarily.\nIf an unreferenced object exists in a local pack _and_ in an alternate object\ndatabase, then I believe it will be loosened and then pruned.  To fix it,\nloosen_unused_packed_objects and add_objects_in_unpacked_packs would have to\niterate through the non-local packs to check whether they contained the object \nbefore loosening/repacking it. Probably won't happen often in practice though.\n\nAlso, I think the --kept-pack-only option is now not necessary.  The last\npatch removes the --kept-pack-only feature /ducks and can be dropped if you\nthink this feature may be useful in the future.\n\n\nBrandon Casey (5):\n  t7700-repack: add two new tests demonstrating repacking flaws\n  git-repack.sh: don't use --kept-pack-only option to pack-objects\n  pack-objects: only repack or loosen objects residing in \"local\" packs\n  t7700-repack: repack -a now works properly, expect success from test\n  Remove --kept-pack-only option and associated infrastructure\n\n builtin-pack-objects.c |    5 ++---\n cache.h                |    1 -\n git-repack.sh          |    6 +-----\n revision.c             |    9 +--------\n revision.h             |    1 -\n sha1_file.c            |   21 +--------------------\n t/t7700-repack.sh      |   46 +++++++++++++++++++++++++++++++++++++++++++++-\n 7 files changed, 50 insertions(+), 39 deletions(-)\n"},{"id":"108643","messageId":"t_s5aa51o2kq_ePRWgLTEpak5ue1ZM7YICzIF-RsnmN68psiOC0Tnz9bsH5tTxgVEU0bxG-OtJ8@cipher.nrlssc.navy.mil","threadId":"18062","inReplyTo":"t_s5aa51o2kq_ePRWgLTEkVg4HqH1dQa6_mVq4djPPG4Vxylm2hNqmx7fPC2W5AsfcXg83DYbGc@cipher.nrlssc.navy.mil","subject":"[PATCH 1/5] t7700-repack: add two new tests demonstrating repacking flaws","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-03-20T03:47:50Z","receivedAt":"2009-03-20T03:47:50Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"  1) The new --kept-pack-only mechansim of rev-list/pack-objects has\n     replaced --unpacked=.  This new mechansim does not operate solely on\n     \"local\" packs now.  The result is that objects residing in an alternate\n     pack which has a .keep file will not be repacked with repack -a.\n\n     This flaw is only apparent when a commit object is the one residing in\n     an alternate kept pack.\n\n  2) The 'repack unpacked objects' and 'loosen unpacked objects' mechanisms\n     of pack-objects, i.e. --keep-unreachable and --unpack-unreachable,\n     now do not operate solely on local packs.  The --keep-unreachable\n     option no longer has any callers, but --unpack-unreachable is used when\n     repack is called with '-A -d' and the local repo has existing packs.\n     In this case, objects residing in alternate, not-kept packs will be\n     loosened, and then immediately deleted by repack's call to\n     prune-packed.\n\n     The test must manually call pack-objects to avoid the call to\n     prune-packed that is made by repack when -d is used.\n---\n t/t7700-repack.sh |   44 ++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 44 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t7700-repack.sh b/t/t7700-repack.sh\nindex f5682d6..e869995 100755\n--- a/t/t7700-repack.sh\n+++ b/t/t7700-repack.sh\n@@ -88,5 +88,49 @@ test_expect_failure 'packed obs in alt ODB are repacked when local repo has pack\n \tdone\n '\n \n+test_expect_failure 'packed obs in alternate ODB kept pack are repacked' '\n+\t# swap the .keep so the commit object is in the pack with .keep\n+\tfor p in alt_objects/pack/*.pack\n+\tdo\n+\t\tbase_name=$(basename $p .pack)\n+\t\tif test -f alt_objects/pack/$base_name.keep\n+\t\tthen\n+\t\t\trm alt_objects/pack/$base_name.keep\n+\t\telse\n+\t\t\ttouch alt_objects/pack/$base_name.keep\n+\t\tfi\n+\tdone\n+\tgit repack -a -d &&\n+\tmyidx=$(ls -1 .git/objects/pack/*.idx) &&\n+\ttest -f \"$myidx\" &&\n+\tfor p in alt_objects/pack/*.idx; do\n+\t\tgit verify-pack -v $p | sed -n -e \"/^[0-9a-f]\\{40\\}/p\"\n+\tdone | while read sha1 rest; do\n+\t\tif ! ( git verify-pack -v $myidx | grep \"^$sha1\" ); then\n+\t\t\techo \"Missing object in local pack: $sha1\"\n+\t\t\treturn 1\n+\t\tfi\n+\tdone\n+'\n+\n+test_expect_failure 'packed unreachable obs in alternate ODB are not loosened' '\n+\trm -f alt_objects/pack/*.keep &&\n+\tmv .git/objects/pack/* alt_objects/pack/ &&\n+\tcsha1=$(git rev-parse HEAD^{commit}) &&\n+\tgit reset --hard HEAD^ &&\n+\tsleep 1 &&\n+\tgit reflog expire --expire=now --expire-unreachable=now --all &&\n+\t# The pack-objects call on the next line is equivalent to\n+\t# git repack -A -d without the call to prune-packed\n+\tgit pack-objects --honor-pack-keep --non-empty --all --reflog \\\n+\t    --unpack-unreachable </dev/null pack &&\n+\trm -f .git/objects/pack/* &&\n+\tmv pack-* .git/objects/pack/ &&\n+\ttest 0 = $(git verify-pack -v -- .git/objects/pack/*.idx |\n+\t\tegrep \"^$csha1 \" | sort | uniq | wc -l) &&\n+\techo > .git/objects/info/alternates &&\n+\ttest_must_fail git show $csha1\n+'\n+\n test_done\n \n-- \n1.6.2.16.geb16e\n"},{"id":"108642","messageId":"t_s5aa51o2kq_ePRWgLTEg6KbvKii55gDA1y-1oKgx9KP4EKyrqg8sDFaph97G5MPoLgUx_vx48@cipher.nrlssc.navy.mil","threadId":"18062","inReplyTo":"t_s5aa51o2kq_ePRWgLTEpak5ue1ZM7YICzIF-RsnmN68psiOC0Tnz9bsH5tTxgVEU0bxG-OtJ8@cipher.nrlssc.navy.mil","subject":"[PATCH 2/5] git-repack.sh: don't use --kept-pack-only option to pack-objects","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-03-20T03:47:51Z","receivedAt":"2009-03-20T03:47:51Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"The --kept-pack-only option to pack-objects treats all kept packs as equal.\nThis results in objects that reside in an alternate pack that has a .keep\nfile, not being packed into a newly created pack when the user specifies the\n-a option to repack.  Since the user may not have any control over the\nalternate database, git should not refrain from repacking those objects\neven though they are in a pack with a .keep file.\n\nThis fixes the 'packed obs in alternate ODB kept pack are repacked' test in\nt7700.\n---\n git-repack.sh     |    6 +-----\n t/t7700-repack.sh |    2 +-\n 2 files changed, 2 insertions(+), 6 deletions(-)\n\ndiff --git a/git-repack.sh b/git-repack.sh\nindex 0144c2d..1782a23 100755\n--- a/git-repack.sh\n+++ b/git-repack.sh\n@@ -71,11 +71,7 @@ case \",$all_into_one,\" in\n \t\t\t\texisting=\"$existing $e\"\n \t\t\tfi\n \t\tdone\n-\t\tif test -n \"$existing\"\n-\t\tthen\n-\t\t\targs=\"--kept-pack-only\"\n-\t\tfi\n-\t\tif test -n \"$args\" -a -n \"$unpack_unreachable\" -a \\\n+\t\tif test -n \"$existing\" -a -n \"$unpack_unreachable\" -a \\\n \t\t\t-n \"$remove_redundant\"\n \t\tthen\n \t\t\targs=\"$args $unpack_unreachable\"\ndiff --git a/t/t7700-repack.sh b/t/t7700-repack.sh\nindex e869995..1242c9d 100755\n--- a/t/t7700-repack.sh\n+++ b/t/t7700-repack.sh\n@@ -88,7 +88,7 @@ test_expect_failure 'packed obs in alt ODB are repacked when local repo has pack\n \tdone\n '\n \n-test_expect_failure 'packed obs in alternate ODB kept pack are repacked' '\n+test_expect_success 'packed obs in alternate ODB kept pack are repacked' '\n \t# swap the .keep so the commit object is in the pack with .keep\n \tfor p in alt_objects/pack/*.pack\n \tdo\n-- \n1.6.2.16.geb16e\n"},{"id":"108644","messageId":"t_s5aa51o2kq_ePRWgLTEvwR8O51ATzGH2_NEfAeCgOx3i1IYGfgLg3-dTPOh68RhaeQgBB9s2g@cipher.nrlssc.navy.mil","threadId":"18062","inReplyTo":"t_s5aa51o2kq_ePRWgLTEg6KbvKii55gDA1y-1oKgx9KP4EKyrqg8sDFaph97G5MPoLgUx_vx48@cipher.nrlssc.navy.mil","subject":"[PATCH 3/5] pack-objects: only repack or loosen objects residing in \"local\" packs","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-03-20T03:47:52Z","receivedAt":"2009-03-20T03:47:52Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"These two features were invented for use by repack when repack will delete\nthe local packs that have been made redundant.  The packs accessible\nthrough alternates are not deleted by repack, so the objects contained in\nthem are still accessible after the local packs are deleted.  They do not\nneed to be repacked into the new pack or loosened.  For the case of\nloosening they would immediately be deleted by the subsequent prune-packed\nthat is called by repack anyway.\n\nThis fixes the test\n'packed unreachable obs in alternate ODB are not loosened' in t7700.\n---\n builtin-pack-objects.c |    4 ++--\n t/t7700-repack.sh      |    2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin-pack-objects.c b/builtin-pack-objects.c\nindex 1c6d2c4..22d69ef 100644\n--- a/builtin-pack-objects.c\n+++ b/builtin-pack-objects.c\n@@ -1966,7 +1966,7 @@ static void add_objects_in_unpacked_packs(struct rev_info *revs)\n \t\tconst unsigned char *sha1;\n \t\tstruct object *o;\n \n-\t\tif (p->pack_keep)\n+\t\tif (!p->pack_local || p->pack_keep)\n \t\t\tcontinue;\n \t\tif (open_pack_index(p))\n \t\t\tdie(\"cannot open pack index\");\n@@ -2002,7 +2002,7 @@ static void loosen_unused_packed_objects(struct rev_info *revs)\n \tconst unsigned char *sha1;\n \n \tfor (p = packed_git; p; p = p->next) {\n-\t\tif (p->pack_keep)\n+\t\tif (!p->pack_local || p->pack_keep)\n \t\t\tcontinue;\n \n \t\tif (open_pack_index(p))\ndiff --git a/t/t7700-repack.sh b/t/t7700-repack.sh\nindex 1242c9d..31e6d22 100755\n--- a/t/t7700-repack.sh\n+++ b/t/t7700-repack.sh\n@@ -113,7 +113,7 @@ test_expect_success 'packed obs in alternate ODB kept pack are repacked' '\n \tdone\n '\n \n-test_expect_failure 'packed unreachable obs in alternate ODB are not loosened' '\n+test_expect_success 'packed unreachable obs in alternate ODB are not loosened' '\n \trm -f alt_objects/pack/*.keep &&\n \tmv .git/objects/pack/* alt_objects/pack/ &&\n \tcsha1=$(git rev-parse HEAD^{commit}) &&\n-- \n1.6.2.16.geb16e\n"},{"id":"108641","messageId":"t_s5aa51o2kq_ePRWgLTEtCnzveAKdblNoXw2p9yc1N22fpuARDjOh9wRXpwEKvultyJoNzUWBY@cipher.nrlssc.navy.mil","threadId":"18062","inReplyTo":"t_s5aa51o2kq_ePRWgLTEvwR8O51ATzGH2_NEfAeCgOx3i1IYGfgLg3-dTPOh68RhaeQgBB9s2g@cipher.nrlssc.navy.mil","subject":"[PATCH 4/5] t7700-repack: repack -a now works properly, expect success from test","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-03-20T03:47:53Z","receivedAt":"2009-03-20T03:47:53Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Thanks to Junio's rework of the --unpacked= option of pack-objects/rev-list\ngit-repack now properly packs objects from alternate repositories even when\nthe local repository contains packs.\n---\n t/t7700-repack.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t7700-repack.sh b/t/t7700-repack.sh\nindex 31e6d22..28fc87a 100755\n--- a/t/t7700-repack.sh\n+++ b/t/t7700-repack.sh\n@@ -69,7 +69,7 @@ test_expect_success 'packed obs in alt ODB are repacked even when local repo is\n \tdone\n '\n \n-test_expect_failure 'packed obs in alt ODB are repacked when local repo has packs' '\n+test_expect_success 'packed obs in alt ODB are repacked when local repo has packs' '\n \trm -f .git/objects/pack/* &&\n \techo new_content >> file1 &&\n \tgit add file1 &&\n-- \n1.6.2.16.geb16e\n"},{"id":"108646","messageId":"t_s5aa51o2kq_ePRWgLTEuhVqJ8uEP2M4mNXlcR5bTOSGntvtmK1-2zwj9VIPyIUzDg3JDg57Nk@cipher.nrlssc.navy.mil","threadId":"18062","inReplyTo":"t_s5aa51o2kq_ePRWgLTEtCnzveAKdblNoXw2p9yc1N22fpuARDjOh9wRXpwEKvultyJoNzUWBY@cipher.nrlssc.navy.mil","subject":"[PATCH 5/5] Remove --kept-pack-only option and associated infrastructure","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-03-20T03:47:54Z","receivedAt":"2009-03-20T03:47:54Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"This option to pack-objects/rev-list was created to improve the -A and -a\noptions of repack.  It was found to be lacking in that it did not provide\nthe ability to differentiate between local and non-local kept packs, and\nfound to be unnecessary since objects residing in local kept packs can be\nfiltered out by the --honor-pack-keep option.\n---\n builtin-pack-objects.c |    1 -\n cache.h                |    1 -\n revision.c             |    9 +--------\n revision.h             |    1 -\n sha1_file.c            |   21 +--------------------\n 5 files changed, 2 insertions(+), 31 deletions(-)\n\ndiff --git a/builtin-pack-objects.c b/builtin-pack-objects.c\nindex 22d69ef..24f96f0 100644\n--- a/builtin-pack-objects.c\n+++ b/builtin-pack-objects.c\n@@ -2200,7 +2200,6 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)\n \t\t\tcontinue;\n \t\t}\n \t\tif (!strcmp(\"--unpacked\", arg) ||\n-\t\t    !strcmp(\"--kept-pack-only\", arg) ||\n \t\t    !strcmp(\"--reflog\", arg) ||\n \t\t    !strcmp(\"--all\", arg)) {\n \t\t\tuse_internal_rev_list = 1;\ndiff --git a/cache.h b/cache.h\nindex 39789ee..a94cf67 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -646,7 +646,6 @@ extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned l\n extern int move_temp_to_file(const char *tmpfile, const char *filename);\n \n extern int has_sha1_pack(const unsigned char *sha1);\n-extern int has_sha1_kept_pack(const unsigned char *sha1);\n extern int has_sha1_file(const unsigned char *sha1);\n extern int has_loose_object_nonlocal(const unsigned char *sha1);\n \ndiff --git a/revision.c b/revision.c\nindex f5771c7..b6215cc 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -1106,10 +1106,6 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg\n \t\trevs->edge_hint = 1;\n \t} else if (!strcmp(arg, \"--unpacked\")) {\n \t\trevs->unpacked = 1;\n-\t\trevs->kept_pack_only = 0;\n-\t} else if (!strcmp(arg, \"--kept-pack-only\")) {\n-\t\trevs->unpacked = 1;\n-\t\trevs->kept_pack_only = 1;\n \t} else if (!prefixcmp(arg, \"--unpacked=\")) {\n \t\tdie(\"--unpacked=<packfile> no longer supported.\");\n \t} else if (!strcmp(arg, \"-r\")) {\n@@ -1679,10 +1675,7 @@ enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit)\n {\n \tif (commit->object.flags & SHOWN)\n \t\treturn commit_ignore;\n-\tif (revs->unpacked &&\n-\t    (revs->kept_pack_only\n-\t     ? has_sha1_kept_pack(commit->object.sha1)\n-\t     : has_sha1_pack(commit->object.sha1)))\n+\tif (revs->unpacked && has_sha1_pack(commit->object.sha1))\n \t\treturn commit_ignore;\n \tif (revs->show_all)\n \t\treturn commit_show;\ndiff --git a/revision.h b/revision.h\nindex ad123d7..6e98b71 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -50,7 +50,6 @@ struct rev_info {\n \t\t\tedge_hint:1,\n \t\t\tlimited:1,\n \t\t\tunpacked:1,\n-\t\t\tkept_pack_only:1,\n \t\t\tboundary:2,\n \t\t\tleft_right:1,\n \t\t\trewrite_parents:1,\ndiff --git a/sha1_file.c b/sha1_file.c\nindex 4563173..a354f06 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -1919,8 +1919,7 @@ off_t find_pack_entry_one(const unsigned char *sha1,\n \treturn 0;\n }\n \n-static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,\n-\t\t\t int kept_pack_only)\n+static int find_pack_entry(const unsigned char *sha1, struct pack_entry *e)\n {\n \tstatic struct packed_git *last_found = (void *)1;\n \tstruct packed_git *p;\n@@ -1932,8 +1931,6 @@ static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,\n \tp = (last_found == (void *)1) ? packed_git : last_found;\n \n \tdo {\n-\t\tif (kept_pack_only && !p->pack_keep)\n-\t\t\tgoto next;\n \t\tif (p->num_bad_objects) {\n \t\t\tunsigned i;\n \t\t\tfor (i = 0; i < p->num_bad_objects; i++)\n@@ -1973,16 +1970,6 @@ static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,\n \treturn 0;\n }\n \n-static int find_pack_entry(const unsigned char *sha1, struct pack_entry *e)\n-{\n-\treturn find_pack_ent(sha1, e, 0);\n-}\n-\n-static int find_kept_pack_entry(const unsigned char *sha1, struct pack_entry *e)\n-{\n-\treturn find_pack_ent(sha1, e, 1);\n-}\n-\n struct packed_git *find_sha1_pack(const unsigned char *sha1,\n \t\t\t\t  struct packed_git *packs)\n {\n@@ -2456,12 +2443,6 @@ int has_sha1_pack(const unsigned char *sha1)\n \treturn find_pack_entry(sha1, &e);\n }\n \n-int has_sha1_kept_pack(const unsigned char *sha1)\n-{\n-\tstruct pack_entry e;\n-\treturn find_kept_pack_entry(sha1, &e);\n-}\n-\n int has_sha1_file(const unsigned char *sha1)\n {\n \tstruct pack_entry e;\n-- \n1.6.2.16.geb16e\n"},{"id":"108647","messageId":"dScXoJvh_LpnaE6p5tEN_KvxO5pPkaKR22Ui_s7wX-kVOZUWyvMieQ@cipher.nrlssc.navy.mil","threadId":"18062","inReplyTo":"t_s5aa51o2kq_ePRWgLTEkVg4HqH1dQa6_mVq4djPPG4Vxylm2hNqmx7fPC2W5AsfcXg83DYbGc@cipher.nrlssc.navy.mil","subject":"Re: [PATCH 0/5] repack improvements","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2009-03-20T04:05:15Z","receivedAt":"2009-03-20T04:05:15Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"\nSorry, I forgot the sign-off on these patches.  If you decide to apply,\nplease add it or tell me to resend.\n\nthanks,\n-brandon\n"}]}