610
void *cb_data)
611
{
612
struct object_id peeled;
613
- struct object_entry *entry = packlist_find(&to_pack, oid, NULL);
613
+ struct object_entry *entry = packlist_find(&to_pack, oid);
614
615
if (entry)
616
entry->tagged = 1;
617
if (!peel_ref(path, &peeled)) {
618
- entry = packlist_find(&to_pack, &peeled, NULL);
618
+ entry = packlist_find(&to_pack, &peeled);
619
if (entry)
620
entry->tagged = 1;
621
}
996
* few lines later when we want to add the new entry.
997
*/
998
static int have_duplicate_entry(const struct object_id *oid,
999
- int exclude,
1000
- uint32_t *index_pos)
999
+ int exclude)
1000
{
1001
struct object_entry *entry;
1002
1004
- entry = packlist_find(&to_pack, oid, index_pos);
1003
+ entry = packlist_find(&to_pack, oid);
1004
if (!entry)
1005
return 0;
1006
1140
uint32_t hash,
1141
int exclude,
1142
int no_try_delta,
1144
- uint32_t index_pos,
1143
struct packed_git *found_pack,
1144
off_t found_offset)
1145
{
1146
struct object_entry *entry;
1147
1150
- entry = packlist_alloc(&to_pack, oid, index_pos);
1148
+ entry = packlist_alloc(&to_pack, oid);
1149
entry->hash = hash;
1150
oe_set_type(entry, type);
1151
if (exclude)
1169
{
1170
struct packed_git *found_pack = NULL;
1171
off_t found_offset = 0;
1174
- uint32_t index_pos;
1172
1173
display_progress(progress_state, ++nr_seen);
1174
1178
- if (have_duplicate_entry(oid, exclude, &index_pos))
1175
+ if (have_duplicate_entry(oid, exclude))
1176
return 0;
1177
1178
if (!want_object_in_pack(oid, exclude, &found_pack, &found_offset)) {
1187
1188
create_object_entry(oid, type, pack_name_hash(name),
1189
exclude, name && no_try_delta(name),
1193
- index_pos, found_pack, found_offset);
1190
+ found_pack, found_offset);
1191
return 1;
1192
}
1193
1196
int flags, uint32_t name_hash,
1197
struct packed_git *pack, off_t offset)
1198
{
1202
- uint32_t index_pos;
1203
-
1199
display_progress(progress_state, ++nr_seen);
1200
1206
- if (have_duplicate_entry(oid, 0, &index_pos))
1201
+ if (have_duplicate_entry(oid, 0))
1202
return 0;
1203
1204
if (!want_object_in_pack(oid, 0, &pack, &offset))
1205
return 0;
1206
1212
- create_object_entry(oid, type, name_hash, 0, 0, index_pos, pack, offset);
1207
+ create_object_entry(oid, type, name_hash, 0, 0, pack, offset);
1208
return 1;
1209
}
1210
1502
* First see if we're already sending the base (or it's explicitly in
1503
* our "excluded" list).
1504
*/
1510
- base = packlist_find(&to_pack, &base_oid, NULL);
1505
+ base = packlist_find(&to_pack, &base_oid);
1506
if (base) {
1507
if (!in_same_island(&delta->idx.oid, &base->idx.oid))
1508
return 0;
2574
* it was included via bitmaps, we would not have parsed it
2575
* previously).
2576
*/
2582
- if (packlist_find(&to_pack, oid, NULL))
2577
+ if (packlist_find(&to_pack, oid))
2578
return;
2579
2580
tag = lookup_tag(the_repository, oid);
2598
2599
if (starts_with(path, "refs/tags/") && /* is a tag? */
2600
!peel_ref(path, &peeled) && /* peelable? */
2606
- packlist_find(&to_pack, &peeled, NULL)) /* object packed? */
2601
+ packlist_find(&to_pack, &peeled)) /* object packed? */
2602
add_tag_chain(oid);
2603
return 0;
2604
}
2798
for (p = strchr(name, '/'); p; p = strchr(p + 1, '/'))
2799
depth++;
2800
2806
- ent = packlist_find(&to_pack, &obj->oid, NULL);
2801
+ ent = packlist_find(&to_pack, &obj->oid);
2802
if (ent && depth > oe_tree_depth(&to_pack, ent))
2803
oe_set_tree_depth(&to_pack, ent, depth);
2804
}
3029
3030
for (i = 0; i < p->num_objects; i++) {
3031
nth_packed_object_oid(&oid, p, i);
3037
- if (!packlist_find(&to_pack, &oid, NULL) &&
3032
+ if (!packlist_find(&to_pack, &oid) &&
3033
!has_sha1_pack_kept_or_nonlocal(&oid) &&
3034
!loosened_object_can_be_discarded(&oid, p->mtime))
3035
if (force_object_loose(&oid, p->mtime))