| 921 | } |
| 922 | |
| 923 | static void parse_gitmodules_oids(int fd, struct oidset *gitmodules_oids) |
| 924 | { |
| 925 | int len = the_hash_algo->hexsz + 1; /* hash + NL */ |
| 926 | |
| 927 | do { |
| 928 | char hex_hash[GIT_MAX_HEXSZ + 1]; |
| 929 | int read_len = read_in_full(fd, hex_hash, len); |
| 930 | struct object_id oid; |
| 931 | const char *end; |
| 932 | |
| 933 | if (!read_len) |
| 934 | return; |
| 935 | if (read_len != len) |
| 936 | die("invalid length read %d", read_len); |
| 937 | if (parse_oid_hex(hex_hash, &oid, &end) || *end != '\n') |
| 938 | die("invalid hash"); |
| 939 | oidset_insert(gitmodules_oids, &oid); |
| 940 | } while (1); |
| 941 | } |
| 942 | |
| 943 | static void add_index_pack_keep_option(struct strvec *args) |
| 944 | { |
no test coverage detected