autoconf: Quote AC_CACHE_CHECK arguments
[gitweb.git] / builtin-rev-list.c
index bc48a3e23081264d06f2659181a19b31694dd993..8437454fbe4e3237aaa6aaecefe54caefb621f1b 100644 (file)
@@ -85,7 +85,7 @@ static void show_commit(struct commit *commit)
                static char pretty_header[16384];
                pretty_print_commit(revs.commit_format, commit, ~0,
                                    pretty_header, sizeof(pretty_header),
-                                   revs.abbrev, NULL, NULL);
+                                   revs.abbrev, NULL, NULL, revs.relative_date);
                printf("%s%c", pretty_header, hdr_termination);
        }
        fflush(stdout);
@@ -93,10 +93,8 @@ static void show_commit(struct commit *commit)
                free_commit_list(commit->parents);
                commit->parents = NULL;
        }
-       if (commit->buffer) {
-               free(commit->buffer);
-               commit->buffer = NULL;
-       }
+       free(commit->buffer);
+       commit->buffer = NULL;
 }
 
 static void process_blob(struct blob *blob,
@@ -111,7 +109,7 @@ static void process_blob(struct blob *blob,
        if (obj->flags & (UNINTERESTING | SEEN))
                return;
        obj->flags |= SEEN;
-       name = strdup(name);
+       name = xstrdup(name);
        add_object(obj, p, path, name);
 }
 
@@ -132,7 +130,7 @@ static void process_tree(struct tree *tree,
        if (parse_tree(tree) < 0)
                die("bad tree object %s", sha1_to_hex(obj->sha1));
        obj->flags |= SEEN;
-       name = strdup(name);
+       name = xstrdup(name);
        add_object(obj, p, path, name);
        me.up = path;
        me.elem = name;