X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Freplace.c;h=4a8970e9c95c1e07c1ed919d40f33238dcd05588;hb=38ca63f3c0ef70ba4e41d3b5e347e2c7e7d67fe5;hp=517fa1031a86f50c0d41ba567237aa701e9c2c05;hpb=1a7bd4fcfa0c57617828dfc1b6b525af674f6d49;p=git.git diff --git a/builtin/replace.c b/builtin/replace.c index 517fa1031..4a8970e9c 100644 --- a/builtin/replace.c +++ b/builtin/replace.c @@ -58,7 +58,7 @@ static int for_each_replace_name(const char **argv, each_replace_name_fn fn) had_error = 1; continue; } - if (!resolve_ref(ref, sha1, 1, NULL)) { + if (read_ref(ref, sha1)) { error("replace ref '%s' not found.", *p); had_error = 1; continue; @@ -97,7 +97,7 @@ static int replace_object(const char *object_ref, const char *replace_ref, if (check_refname_format(ref, 0)) die("'%s' is not a valid ref name.", ref); - if (!resolve_ref(ref, prev, 1, NULL)) + if (read_ref(ref, prev)) hashclr(prev); else if (!force) die("replace ref '%s' already exists", ref);