| 1250 | } |
| 1251 | |
| 1252 | static int add_commit_to_bitmap(struct bitmap_index *bitmap_git, |
| 1253 | struct bitmap **base, |
| 1254 | struct commit *commit) |
| 1255 | { |
| 1256 | struct ewah_bitmap *or_with = bitmap_for_commit(bitmap_git, commit); |
| 1257 | |
| 1258 | if (!or_with) { |
| 1259 | existing_bitmaps_misses_nr++; |
| 1260 | return 0; |
| 1261 | } |
| 1262 | |
| 1263 | existing_bitmaps_hits_nr++; |
| 1264 | |
| 1265 | if (!*base) |
| 1266 | *base = ewah_to_bitmap(or_with); |
| 1267 | else |
| 1268 | bitmap_or_ewah(*base, or_with); |
| 1269 | |
| 1270 | return 1; |
| 1271 | } |
| 1272 | |
| 1273 | static struct bitmap *fill_in_bitmap(struct bitmap_index *bitmap_git, |
| 1274 | struct rev_info *revs, |
no test coverage detected