summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index bcefa52..2000d97 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1293,7 +1293,7 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
max_size = trg_entry->delta_size;
ref_depth = trg->depth;
}
- max_size = max_size * (max_depth - src->depth) /
+ max_size = (uint64_t)max_size * (max_depth - src->depth) /
(max_depth - ref_depth + 1);
if (max_size == 0)
return 0;
@@ -1966,11 +1966,7 @@ static void add_objects_in_unpacked_packs(struct rev_info *revs)
const unsigned char *sha1;
struct object *o;
- for (i = 0; i < revs->num_ignore_packed; i++) {
- if (matches_pack_name(p, revs->ignore_packed[i]))
- break;
- }
- if (revs->num_ignore_packed <= i)
+ if (p->pack_keep)
continue;
if (open_pack_index(p))
die("cannot open pack index");
@@ -2006,11 +2002,7 @@ static void loosen_unused_packed_objects(struct rev_info *revs)
const unsigned char *sha1;
for (p = packed_git; p; p = p->next) {
- for (i = 0; i < revs->num_ignore_packed; i++) {
- if (matches_pack_name(p, revs->ignore_packed[i]))
- break;
- }
- if (revs->num_ignore_packed <= i)
+ if (p->pack_keep)
continue;
if (open_pack_index(p))
@@ -2208,7 +2200,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
continue;
}
if (!strcmp("--unpacked", arg) ||
- !prefixcmp(arg, "--unpacked=") ||
+ !strcmp("--kept-pack-only", arg) ||
!strcmp("--reflog", arg) ||
!strcmp("--all", arg)) {
use_internal_rev_list = 1;