Now, if you say
git log --walk-reflogs --relative-date next@{yesterday}
it shows the reflog date as a relative date expression.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
log-tree.c | 3 ++-
reflog-walk.c | 6 +++---
reflog-walk.h | 3 ++-
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/log-tree.c b/log-tree.c
index f043ad3..843a7c5 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -225,7 +225,8 @@ void show_log(struct rev_info *opt, const char *sep)
diff_get_color(opt->diffopt.color_diff, DIFF_RESET));
putchar(opt->commit_format == CMIT_FMT_ONELINE ? ' ' : '\n');
if (opt->reflog_info)
- show_reflog_message(opt->reflog_info);
+ show_reflog_message(opt->reflog_info,
+ opt->relative_date);
}
/*
diff --git a/reflog-walk.c b/reflog-walk.c
index d58ff9b..6706f45 100644
--- a/reflog-walk.c
+++ b/reflog-walk.c
@@ -215,7 +215,7 @@ void fake_reflog_parent(struct reflog_walk_info *info, struct commit *commit)
commit->object.flags &= ~(ADDED | SEEN | SHOWN);
}
-void show_reflog_message(struct reflog_walk_info* info)
+void show_reflog_message(struct reflog_walk_info* info, int relative_date)
{
if (info && info->last_commit_reflog) {
struct commit_reflog *commit_reflog = info->last_commit_reflog;
@@ -224,8 +224,8 @@ void show_reflog_message(struct reflog_walk_info* info)
printf("Reflog: %s@{", commit_reflog->reflogs->ref);
info = &commit_reflog->reflogs->items[commit_reflog->recno + 1];
if (commit_reflog->flag)
- printf("%s", show_rfc2822_date(info->timestamp,
- info->tz));
+ printf("%s", show_date(info->timestamp, info->tz,
+ relative_date));
else
printf("%d", commit_reflog->reflogs->nr
- 2 - commit_reflog->recno);
diff --git a/reflog-walk.h b/reflog-walk.h
index 787996b..b7a65e7 100644
--- a/reflog-walk.h
+++ b/reflog-walk.h
@@ -6,6 +6,7 @@ extern void add_reflog_for_walk(struct reflog_walk_info *info,
struct commit *commit, const char *name);
extern void fake_reflog_parent(struct reflog_walk_info *info,
struct commit *commit);
-extern void show_reflog_message(struct reflog_walk_info* info);
+extern void show_reflog_message(struct reflog_walk_info* info,
+ int relative_date);
#endif
--
1.5.0.rc1.g956c1-dirty
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Sean | Re: [AppArmor 39/45] AppArmor: Profile loading and manipulation,pathname matching |
| Herbert Xu | Re: 2.6.23-rc4-mm1 |
| Miklos Szeredi | Re: [BUG] long freezes on thinkpad t60 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
git: | |
| Matthieu Moy | Re: [RFC] Convert builin-mailinfo.c to use The Better String Library. |
| Guido Ostkamp | [PATCH] Fix Solaris Workshop Compiler issues |
| Shawn Pearce | Re: [RFC] Submodules in GIT |
| Imran M Yousuf | Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Marco Peereboom | Re: Real men don't attack straw men |
| patrick keshishian | SMTP flood + spamdb |
| Andrés Delfino | Re: bcw(4) is gone |
| Tilman Schmidt | Re: 2.6.25-rc8: FTP transfer errors |
| Denys Fedoryshchenko | SFQ depth limit |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| high memory | 16 hours ago | Linux kernel |
| semaphore access speed | 19 hours ago | Applications and Utilities |
| the kernel how to power off the machine | 20 hours ago | Linux kernel |
| Easter Eggs in windows XP | 23 hours ago | Windows |
| Shared swap partition | 1 day ago | Linux general |
| Root password | 1 day ago | Linux general |
| Where/when DNOTIFY is used? | 1 day ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 1 day ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 1 day ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 1 day ago | Linux general |
