summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/revision.c b/revision.c
index 9ff120b305..34bc81adf4 100644
--- a/revision.c
+++ b/revision.c
@@ -1303,7 +1303,7 @@ static int add_parents_only(struct rev_info *revs, const char *arg_, int flags,
flags ^= UNINTERESTING | BOTTOM;
arg++;
}
- if (get_sha1_committish(arg, oid.hash))
+ if (get_oid_committish(arg, &oid))
return 0;
while (1) {
it = get_reference(revs, arg, &oid, 0);
@@ -1467,8 +1467,8 @@ static int handle_dotdot_1(const char *arg, char *dotdot,
if (!*b_name)
b_name = "HEAD";
- if (get_sha1_with_context(a_name, oc_flags, a_oid.hash, a_oc) ||
- get_sha1_with_context(b_name, oc_flags, b_oid.hash, b_oc))
+ if (get_oid_with_context(a_name, oc_flags, &a_oid, a_oc) ||
+ get_oid_with_context(b_name, oc_flags, &b_oid, b_oc))
return -1;
if (!cant_be_filename) {
@@ -1602,7 +1602,7 @@ int handle_revision_arg(const char *arg_, struct rev_info *revs, int flags, unsi
if (revarg_opt & REVARG_COMMITTISH)
get_sha1_flags |= GET_SHA1_COMMITTISH;
- if (get_sha1_with_context(arg, get_sha1_flags, oid.hash, &oc))
+ if (get_oid_with_context(arg, get_sha1_flags, &oid, &oc))
return revs->ignore_missing ? 0 : -1;
if (!cant_be_filename)
verify_non_filename(revs->prefix, arg);
@@ -2321,7 +2321,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
struct object_id oid;
struct object *object;
struct object_context oc;
- if (get_sha1_with_context(revs->def, 0, oid.hash, &oc))
+ if (get_oid_with_context(revs->def, 0, &oid, &oc))
diagnose_missing_default(revs->def);
object = get_reference(revs, revs->def, &oid, 0);
add_pending_object_with_mode(revs, object, revs->def, oc.mode);