MCPcopy Index your code
hub / github.com/git/git / write_selected_commits_v1

Function write_selected_commits_v1

pack-bitmap-write.c:1126–1146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1124}
1125
1126static void write_selected_commits_v1(struct bitmap_writer *writer,
1127 struct hashfile *f, off_t *offsets)
1128{
1129 int i;
1130
1131 for (i = 0; i < bitmap_writer_nr_selected_commits(writer); ++i) {
1132 struct bitmapped_commit *stored = &writer->selected[i];
1133 if (stored->pseudo_merge)
1134 BUG("unexpected pseudo-merge among selected: %s",
1135 oid_to_hex(&stored->commit->object.oid));
1136
1137 if (offsets)
1138 offsets[i] = hashfile_total(f);
1139
1140 hashwrite_be32(f, stored->commit_pos);
1141 hashwrite_u8(f, stored->xor_offset);
1142 hashwrite_u8(f, stored->flags);
1143
1144 dump_bitmap(f, stored->write_as);
1145 }
1146}
1147
1148static int pseudo_merge_commit_pos_cmp(const void *_va, const void *_vb,
1149 void *_data)

Callers 1

bitmap_writer_finishFunction · 0.85

Calls 6

oid_to_hexFunction · 0.85
hashfile_totalFunction · 0.85
hashwrite_be32Function · 0.85
hashwrite_u8Function · 0.85
dump_bitmapFunction · 0.85

Tested by

no test coverage detected