Imported Upstream version 2.6.0
[platform/upstream/git.git] / log-tree.c
index 01beb11..7b1b57a 100644 (file)
@@ -97,11 +97,12 @@ static int add_ref_decoration(const char *refname, const struct object_id *oid,
 
        assert(cb_data == NULL);
 
-       if (starts_with(refname, "refs/replace/")) {
+       if (starts_with(refname, git_replace_ref_base)) {
                struct object_id original_oid;
                if (!check_replace_refs)
                        return 0;
-               if (get_oid_hex(refname + 13, &original_oid)) {
+               if (get_oid_hex(refname + strlen(git_replace_ref_base),
+                               &original_oid)) {
                        warning("invalid replace ref %s", refname);
                        return 0;
                }
@@ -639,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;