Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Casey <casey@nrlssc.navy.mil>2009-03-20 06:47:54 +0300
committerJunio C Hamano <gitster@pobox.com>2009-03-20 23:32:33 +0300
commit4d6acb70411cd4fe69610cf1b22f186fa01614f7 (patch)
tree26b206a75519f28d59e1e34e718d74288637c412 /sha1_file.c
parent79bc4c715516fdb393d107359327c1e7fbb8bf04 (diff)
Remove --kept-pack-only option and associated infrastructure
This option to pack-objects/rev-list was created to improve the -A and -a options of repack. It was found to be lacking in that it did not provide the ability to differentiate between local and non-local kept packs, and found to be unnecessary since objects residing in local kept packs can be filtered out by the --honor-pack-keep option. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 7ead56cc3e..500fd93127 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1856,8 +1856,7 @@ off_t find_pack_entry_one(const unsigned char *sha1,
return 0;
}
-static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,
- int kept_pack_only)
+static int find_pack_entry(const unsigned char *sha1, struct pack_entry *e)
{
static struct packed_git *last_found = (void *)1;
struct packed_git *p;
@@ -1869,8 +1868,6 @@ static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,
p = (last_found == (void *)1) ? packed_git : last_found;
do {
- if (kept_pack_only && !p->pack_keep)
- goto next;
if (p->num_bad_objects) {
unsigned i;
for (i = 0; i < p->num_bad_objects; i++)
@@ -1910,16 +1907,6 @@ static int find_pack_ent(const unsigned char *sha1, struct pack_entry *e,
return 0;
}
-static int find_pack_entry(const unsigned char *sha1, struct pack_entry *e)
-{
- return find_pack_ent(sha1, e, 0);
-}
-
-static int find_kept_pack_entry(const unsigned char *sha1, struct pack_entry *e)
-{
- return find_pack_ent(sha1, e, 1);
-}
-
struct packed_git *find_sha1_pack(const unsigned char *sha1,
struct packed_git *packs)
{
@@ -2387,12 +2374,6 @@ int has_sha1_pack(const unsigned char *sha1)
return find_pack_entry(sha1, &e);
}
-int has_sha1_kept_pack(const unsigned char *sha1)
-{
- struct pack_entry e;
- return find_kept_pack_entry(sha1, &e);
-}
-
int has_sha1_file(const unsigned char *sha1)
{
struct pack_entry e;