RelNotes: mention "log: add -P as a synonym for --perl-regexp"
[gitweb.git] / pretty.c
index 6cc812c2c72c2281299c44fd81376441bb16a0ec..e4b561c5822b7b19878065c77a04ffa0c9e43d61 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "config.h"
 #include "commit.h"
 #include "utf8.h"
 #include "diff.h"
@@ -405,11 +406,11 @@ static void add_rfc2047(struct strbuf *sb, const char *line, size_t len,
 const char *show_ident_date(const struct ident_split *ident,
                            const struct date_mode *mode)
 {
-       unsigned long date = 0;
+       timestamp_t date = 0;
        long tz = 0;
 
        if (ident->date_begin && ident->date_end)
-               date = strtoul(ident->date_begin, NULL, 10);
+               date = parse_timestamp(ident->date_begin, NULL, 10);
        if (date_overflows(date))
                date = 0;
        else {
@@ -1117,7 +1118,7 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
 
        /* these depend on the commit */
        if (!commit->object.parsed)
-               parse_object(commit->object.oid.hash);
+               parse_object(&commit->object.oid);
 
        switch (placeholder[0]) {
        case 'H':               /* commit hash */