summaryrefslogtreecommitdiff
path: root/reflog-walk.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-03-26 00:27:37 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-03-26 00:27:37 -0700
commitf504fa2acbd67b28e9e91ee6cd1f2d1a26d96128 (patch)
tree75722b0e6b4bbe30e6b75c6648430e5ecf4f7d27 /reflog-walk.c
parentMerge branch 'jc/attributes-checkout' (diff)
parentmake oneline reflog dates more consistent with multiline format (diff)
downloadtgif-f504fa2acbd67b28e9e91ee6cd1f2d1a26d96128.tar.xz
Merge branch 'jk/reflog-date'
* jk/reflog-date: make oneline reflog dates more consistent with multiline format
Diffstat (limited to 'reflog-walk.c')
-rw-r--r--reflog-walk.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/reflog-walk.c b/reflog-walk.c
index f751fdc8d8..fd065f4e1a 100644
--- a/reflog-walk.c
+++ b/reflog-walk.c
@@ -242,7 +242,7 @@ void fake_reflog_parent(struct reflog_walk_info *info, struct commit *commit)
}
void show_reflog_message(struct reflog_walk_info* info, int oneline,
- int relative_date)
+ enum date_mode dmode)
{
if (info && info->last_commit_reflog) {
struct commit_reflog *commit_reflog = info->last_commit_reflog;
@@ -251,8 +251,10 @@ void show_reflog_message(struct reflog_walk_info* info, int oneline,
info = &commit_reflog->reflogs->items[commit_reflog->recno+1];
if (oneline) {
printf("%s@{", commit_reflog->reflogs->ref);
- if (commit_reflog->flag || relative_date)
- printf("%s", show_date(info->timestamp, 0, 1));
+ if (commit_reflog->flag || dmode)
+ printf("%s", show_date(info->timestamp,
+ info->tz,
+ dmode));
else
printf("%d", commit_reflog->reflogs->nr
- 2 - commit_reflog->recno);
@@ -260,10 +262,10 @@ void show_reflog_message(struct reflog_walk_info* info, int oneline,
}
else {
printf("Reflog: %s@{", commit_reflog->reflogs->ref);
- if (commit_reflog->flag || relative_date)
+ if (commit_reflog->flag || dmode)
printf("%s", show_date(info->timestamp,
info->tz,
- relative_date));
+ dmode));
else
printf("%d", commit_reflog->reflogs->nr
- 2 - commit_reflog->recno);