]> git.ipfire.org Git - thirdparty/git.git/commitdiff
show-branch: use DATE_RELATIVE instead of magic number
authorJeff King <peff@peff.net>
Thu, 25 Jun 2015 16:54:31 +0000 (12:54 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 29 Jun 2015 18:39:04 +0000 (11:39 -0700)
This is more readable, and won't break if we ever change the
order of the date_mode enum.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/show-branch.c

index 323f85746358676cccecd646e6cb820e723031cf..d78461389af4fb86d68c7d5188f747f9270be149 100644 (file)
@@ -784,7 +784,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
                        else
                                msg++;
                        reflog_msg[i] = xstrfmt("(%s) %s",
-                                               show_date(timestamp, tz, 1),
+                                               show_date(timestamp, tz, DATE_RELATIVE),
                                                msg);
                        free(logmsg);
                        sprintf(nth_desc, "%s@{%d}", *av, base+i);