aboutsummaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-04-01 22:34:19 -0700
committerJunio C Hamano <gitster@pobox.com>2009-04-01 22:34:19 -0700
commit3c91bf6805249d0f59ddff4e5dc4118127527243 (patch)
tree8f07aa193c5206f736c1dbe2e3ac688938704636 /sha1_file.c
parent988d9fd8a42b388c30625378dcb521a3b2021b72 (diff)
parent094085e3362c592c932b41525ed37152ec171192 (diff)
downloadgit-3c91bf6805249d0f59ddff4e5dc4118127527243.tar.gz
git-3c91bf6805249d0f59ddff4e5dc4118127527243.tar.xz
Merge branch 'jc/maint-1.6.0-keep-pack'
* jc/maint-1.6.0-keep-pack: pack-objects: don't loosen objects available in alternate or kept packs t7700: demonstrate repack flaw which may loosen objects unnecessarily Remove --kept-pack-only option and associated infrastructure pack-objects: only repack or loosen objects residing in "local" packs git-repack.sh: don't use --kept-pack-only option to pack-objects t7700-repack: add two new tests demonstrating repacking flaws Conflicts: t/t7700-repack.sh
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 54972f97e..37e833b77 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1919,8 +1919,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;
@@ -1932,8 +1931,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++)
@@ -1973,16 +1970,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)
{
@@ -2456,12 +2443,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;