submodule--helper: die on config error when cloning module
[gitweb.git] / builtin / rev-list.c
index d80d1ed35944144aa0aeeeb1b0e08c9efdec6523..3aa89a1a3cd951afdb97cf1fe371404fc96bca8d 100644 (file)
@@ -81,14 +81,14 @@ static void show_commit(struct commit *commit, void *data)
        if (!revs->graph)
                fputs(get_revision_mark(revs, commit), stdout);
        if (revs->abbrev_commit && revs->abbrev)
-               fputs(find_unique_abbrev(commit->object.sha1, revs->abbrev),
+               fputs(find_unique_abbrev(commit->object.oid.hash, revs->abbrev),
                      stdout);
        else
-               fputs(sha1_to_hex(commit->object.sha1), stdout);
+               fputs(oid_to_hex(&commit->object.oid), stdout);
        if (revs->print_parents) {
                struct commit_list *parents = commit->parents;
                while (parents) {
-                       printf(" %s", sha1_to_hex(parents->item->object.sha1));
+                       printf(" %s", oid_to_hex(&parents->item->object.oid));
                        parents = parents->next;
                }
        }
@@ -97,7 +97,7 @@ static void show_commit(struct commit *commit, void *data)
 
                children = lookup_decoration(&revs->children, &commit->object);
                while (children) {
-                       printf(" %s", sha1_to_hex(children->item->object.sha1));
+                       printf(" %s", oid_to_hex(&children->item->object.oid));
                        children = children->next;
                }
        }
@@ -182,10 +182,10 @@ static void finish_object(struct object *obj,
                          void *cb_data)
 {
        struct rev_list_info *info = cb_data;
-       if (obj->type == OBJ_BLOB && !has_sha1_file(obj->sha1))
-               die("missing blob object '%s'", sha1_to_hex(obj->sha1));
+       if (obj->type == OBJ_BLOB && !has_object_file(&obj->oid))
+               die("missing blob object '%s'", oid_to_hex(&obj->oid));
        if (info->revs->verify_objects && !obj->parsed && obj->type != OBJ_COMMIT)
-               parse_object(obj->sha1);
+               parse_object(obj->oid.hash);
 }
 
 static void show_object(struct object *obj,
@@ -201,7 +201,7 @@ static void show_object(struct object *obj,
 
 static void show_edge(struct commit *commit)
 {
-       printf("-%s\n", sha1_to_hex(commit->object.sha1));
+       printf("-%s\n", oid_to_hex(&commit->object.oid));
 }
 
 static void print_var_str(const char *var, const char *val)
@@ -217,7 +217,7 @@ static void print_var_int(const char *var, int val)
 static int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
 {
        int cnt, flags = info->flags;
-       char hex[41] = "";
+       char hex[GIT_SHA1_HEXSZ + 1] = "";
        struct commit_list *tried;
        struct rev_info *revs = info->revs;
 
@@ -242,7 +242,7 @@ static int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
                cnt = reaches;
 
        if (revs->commits)
-               strcpy(hex, sha1_to_hex(revs->commits->item->object.sha1));
+               sha1_to_hex_r(hex, revs->commits->item->object.oid.hash);
 
        if (flags & BISECT_SHOW_ALL) {
                traverse_commit_list(revs, show_commit, show_object, info);