aboutsummaryrefslogtreecommitdiff
path: root/builtin/replace.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-12-09 13:37:14 -0800
committerJunio C Hamano <gitster@pobox.com>2011-12-09 13:37:14 -0800
commitb7f7c07977ab6e41899b835b873a1ac499eaa2b3 (patch)
tree9b20151eb2b1a325ed2c72c22fad41616d8d98db /builtin/replace.c
parenteb8aa3d2c2849cb3a44396b89054339df38e2bfa (diff)
parentd5a35c114ab6b4337a1c7598bf75c331d94ee092 (diff)
downloadgit-b7f7c07977ab6e41899b835b873a1ac499eaa2b3.tar.gz
git-b7f7c07977ab6e41899b835b873a1ac499eaa2b3.tar.xz
Merge branch 'nd/resolve-ref'
* nd/resolve-ref: Copy resolve_ref() return value for longer use Convert many resolve_ref() calls to read_ref*() and ref_exists() Conflicts: builtin/fmt-merge-msg.c builtin/merge.c refs.c
Diffstat (limited to 'builtin/replace.c')
-rw-r--r--builtin/replace.c4
1 files changed, 2 insertions, 2 deletions
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);