| 166 | } |
| 167 | |
| 168 | static int read_one_commit(struct oidset *commits, struct progress *progress, |
| 169 | const char *hash) |
| 170 | { |
| 171 | struct object *result; |
| 172 | struct object_id oid; |
| 173 | const char *end; |
| 174 | |
| 175 | if (parse_oid_hex(hash, &oid, &end)) |
| 176 | return error(_("unexpected non-hex object ID: %s"), hash); |
| 177 | |
| 178 | result = deref_tag(the_repository, parse_object(the_repository, &oid), |
| 179 | NULL, 0); |
| 180 | if (!result) |
| 181 | return error(_("invalid object: %s"), hash); |
| 182 | else if (object_as_type(result, OBJ_COMMIT, 1)) |
| 183 | oidset_insert(commits, &result->oid); |
| 184 | |
| 185 | display_progress(progress, oidset_size(commits)); |
| 186 | |
| 187 | return 0; |
| 188 | } |
| 189 | |
| 190 | static int write_option_max_new_filters(const struct option *opt, |
| 191 | const char *arg, |
no test coverage detected