show-branch: use DATE_RELATIVE instead of magic number

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>
This commit is contained in:
Jeff King 2015-06-25 12:54:31 -04:00 committed by Junio C Hamano
parent 912bd497e9
commit b7c1e11dc4

View 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);