{"thread":{"id":"6458","subject":"[PATCH] --walk-reflogs: honour --relative-date","startedAt":"2007-01-20T21:39:08Z","lastAt":"2007-01-20T21:39:08Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"32177","messageId":"Pine.LNX.4.63.0701202238260.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6458","inReplyTo":null,"subject":"[PATCH] --walk-reflogs: honour --relative-date","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-01-20T21:39:08Z","receivedAt":"2007-01-20T21:39:08Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nNow, if you say\n\n\tgit log --walk-reflogs --relative-date next@{yesterday}\n\nit shows the reflog date as a relative date expression.\n\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n---\n log-tree.c    |    3 ++-\n reflog-walk.c |    6 +++---\n reflog-walk.h |    3 ++-\n 3 files changed, 7 insertions(+), 5 deletions(-)\n\ndiff --git a/log-tree.c b/log-tree.c\nindex f043ad3..843a7c5 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -225,7 +225,8 @@ void show_log(struct rev_info *opt, const char *sep)\n \t\t       diff_get_color(opt->diffopt.color_diff, DIFF_RESET));\n \t\tputchar(opt->commit_format == CMIT_FMT_ONELINE ? ' ' : '\\n');\n \t\tif (opt->reflog_info)\n-\t\t\tshow_reflog_message(opt->reflog_info);\n+\t\t\tshow_reflog_message(opt->reflog_info,\n+\t\t\t\t\topt->relative_date);\n \t}\n \n \t/*\ndiff --git a/reflog-walk.c b/reflog-walk.c\nindex d58ff9b..6706f45 100644\n--- a/reflog-walk.c\n+++ b/reflog-walk.c\n@@ -215,7 +215,7 @@ void fake_reflog_parent(struct reflog_walk_info *info, struct commit *commit)\n \tcommit->object.flags &= ~(ADDED | SEEN | SHOWN);\n }\n \n-void show_reflog_message(struct reflog_walk_info* info)\n+void show_reflog_message(struct reflog_walk_info* info, int relative_date)\n {\n \tif (info && info->last_commit_reflog) {\n \t\tstruct commit_reflog *commit_reflog = info->last_commit_reflog;\n@@ -224,8 +224,8 @@ void show_reflog_message(struct reflog_walk_info* info)\n \t\tprintf(\"Reflog: %s@{\", commit_reflog->reflogs->ref);\n \t\tinfo = &commit_reflog->reflogs->items[commit_reflog->recno + 1];\n \t\tif (commit_reflog->flag)\n-\t\t\tprintf(\"%s\", show_rfc2822_date(info->timestamp,\n-\t\t\t\t\t\tinfo->tz));\n+\t\t\tprintf(\"%s\", show_date(info->timestamp, info->tz,\n+\t\t\t\t\t\trelative_date));\n \t\telse\n \t\t\tprintf(\"%d\", commit_reflog->reflogs->nr\n \t\t\t\t\t- 2 - commit_reflog->recno);\ndiff --git a/reflog-walk.h b/reflog-walk.h\nindex 787996b..b7a65e7 100644\n--- a/reflog-walk.h\n+++ b/reflog-walk.h\n@@ -6,6 +6,7 @@ extern void add_reflog_for_walk(struct reflog_walk_info *info,\n \t\tstruct commit *commit, const char *name);\n extern void fake_reflog_parent(struct reflog_walk_info *info,\n \t\tstruct commit *commit);\n-extern void show_reflog_message(struct reflog_walk_info* info);\n+extern void show_reflog_message(struct reflog_walk_info* info,\n+\t\tint relative_date);\n \n #endif\n-- \n1.5.0.rc1.g956c1-dirty\n"}]}