X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Freplace.c;h=4a8970e9c95c1e07c1ed919d40f33238dcd05588;hb=ef8adcadfef2300d853016d26e7d2d0429b98a76;hp=517fa1031a86f50c0d41ba567237aa701e9c2c05;hpb=7fc1495b1800f5207b634140ed66f7037e7f4bff;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);