assert(cb_data == NULL);
- if (starts_with(refname, "refs/replace/")) {
+ if (starts_with(refname, git_replace_ref_base)) {
unsigned char original_sha1[20];
if (!check_replace_refs)
return 0;
- if (get_sha1_hex(refname + 13, original_sha1)) {
+ if (get_sha1_hex(refname + strlen(git_replace_ref_base),
+ original_sha1)) {
warning("invalid replace ref %s", refname);
return 0;
}