Merge branch 'bc/object-id'
[gitweb.git] / builtin / rev-parse.c
index 4af122264444059a22788f29226c4712c311fdde..efdc14473be53ff79b13012d650ec5fded052fd9 100644 (file)
@@ -218,7 +218,7 @@ static void show_datestring(const char *flag, const char *datestr)
        /* date handling requires both flags and revs */
        if ((filter & (DO_FLAGS | DO_REVS)) != (DO_FLAGS | DO_REVS))
                return;
-       buffer = xstrfmt("%s%lu", flag, approxidate(datestr));
+       buffer = xstrfmt("%s%"PRItime, flag, approxidate(datestr));
        show(buffer);
        free(buffer);
 }
@@ -279,8 +279,8 @@ static int try_difference(const char *arg)
                if (symmetric) {
                        struct commit_list *exclude;
                        struct commit *a, *b;
-                       a = lookup_commit_reference(oid.hash);
-                       b = lookup_commit_reference(end.hash);
+                       a = lookup_commit_reference(&oid);
+                       b = lookup_commit_reference(&end);
                        exclude = get_merge_bases(a, b);
                        while (exclude) {
                                struct commit *commit = pop_commit(&exclude);
@@ -332,7 +332,7 @@ static int try_parent_shorthands(const char *arg)
                return 0;
        }
 
-       commit = lookup_commit_reference(oid.hash);
+       commit = lookup_commit_reference(&oid);
        if (exclude_parent &&
            exclude_parent > commit_list_count(commit->parents)) {
                *dotdot = '^';