return ret;
}
-int unregister_shallow(const unsigned char *sha1)
+int unregister_shallow(const struct object_id *oid)
{
- int pos = commit_graft_pos(sha1);
+ int pos = commit_graft_pos(oid->hash);
if (pos < 0)
return -1;
if (pos + 1 < commit_graft_nr)
p++;
if (*p) {
p = skip_blank_lines(p + 2);
- for (eol = p; *eol && *eol != '\n'; eol++)
- ; /* do nothing */
+ eol = strchrnul(p, '\n');
} else
eol = p;