git-am: add am.threeWay config variable
[gitweb.git] / log-tree.c
index 9c25bbc1c5c4b90233ac48f4469cdd7cfe3c68ad..7b1b57aaf6e48a430f664fa8deafb75a0cfcc576 100644 (file)
@@ -89,7 +89,8 @@ const struct name_decoration *get_name_decoration(const struct object *obj)
        return lookup_decoration(&name_decoration, obj);
 }
 
-static int add_ref_decoration(const char *refname, const unsigned char *sha1, int flags, void *cb_data)
+static int add_ref_decoration(const char *refname, const struct object_id *oid,
+                             int flags, void *cb_data)
 {
        struct object *obj;
        enum decoration_type type = DECORATION_NONE;
@@ -97,21 +98,21 @@ static int add_ref_decoration(const char *refname, const unsigned char *sha1, in
        assert(cb_data == NULL);
 
        if (starts_with(refname, git_replace_ref_base)) {
-               unsigned char original_sha1[20];
+               struct object_id original_oid;
                if (!check_replace_refs)
                        return 0;
-               if (get_sha1_hex(refname + strlen(git_replace_ref_base),
-                                original_sha1)) {
+               if (get_oid_hex(refname + strlen(git_replace_ref_base),
+                               &original_oid)) {
                        warning("invalid replace ref %s", refname);
                        return 0;
                }
-               obj = parse_object(original_sha1);
+               obj = parse_object(original_oid.hash);
                if (obj)
                        add_name_decoration(DECORATION_GRAFTED, "replaced", obj);
                return 0;
        }
 
-       obj = parse_object(sha1);
+       obj = parse_object(oid->hash);
        if (!obj)
                return 0;
 
@@ -150,6 +151,7 @@ static int add_graft_decoration(const struct commit_graft *graft, void *cb_data)
 void load_ref_decorations(int flags)
 {
        if (!decoration_loaded) {
+
                decoration_loaded = 1;
                decoration_flags = flags;
                for_each_ref(add_ref_decoration, NULL);
@@ -638,7 +640,7 @@ void show_log(struct rev_info *opt)
                         */
                        show_reflog_message(opt->reflog_info,
                                            opt->commit_format == CMIT_FMT_ONELINE,
-                                           opt->date_mode,
+                                           &opt->date_mode,
                                            opt->date_mode_explicit);
                        if (opt->commit_format == CMIT_FMT_ONELINE)
                                return;