diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-05-07 14:11:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-07 14:18:06 -0700 |
commit | 55ccf85a524f6a2d8cb5582d80a2927ff11dfb64 (patch) | |
tree | 1547dcd5e1f48f8427b9b6f11413aab48276e5a9 /reflog-walk.c | |
parent | 794151e9b595ddc2700c0801caabfd27be763e12 (diff) | |
download | git-55ccf85a524f6a2d8cb5582d80a2927ff11dfb64.tar.gz |
reflog-walk: tell explicit --date=default from not having --date at all
Introduction of opt->date_mode_explicit was a step in the right direction,
but lost that crucial bit at the very end of the callchain, and the callee
could not tell an explicitly specified "I want *date* but in default format"
from the built-in default value passed when there was no --date specified.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reflog-walk.c')
-rw-r--r-- | reflog-walk.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/reflog-walk.c b/reflog-walk.c index b84e80f2ca..0c904fb2d1 100644 --- a/reflog-walk.c +++ b/reflog-walk.c @@ -252,7 +252,7 @@ void fake_reflog_parent(struct reflog_walk_info *info, struct commit *commit) void get_reflog_selector(struct strbuf *sb, struct reflog_walk_info *reflog_info, - enum date_mode dmode, + enum date_mode dmode, int force_date, int shorten) { struct commit_reflog *commit_reflog = reflog_info->last_commit_reflog; @@ -273,7 +273,7 @@ void get_reflog_selector(struct strbuf *sb, strbuf_addf(sb, "%s@{", printed_ref); if (commit_reflog->selector == SELECTOR_DATE || - (commit_reflog->selector == SELECTOR_NONE && dmode)) { + (commit_reflog->selector == SELECTOR_NONE && force_date)) { info = &commit_reflog->reflogs->items[commit_reflog->recno+1]; strbuf_addstr(sb, show_date(info->timestamp, info->tz, dmode)); } else { @@ -302,7 +302,7 @@ void get_reflog_message(struct strbuf *sb, } void show_reflog_message(struct reflog_walk_info *reflog_info, int oneline, - enum date_mode dmode) + enum date_mode dmode, int force_date) { if (reflog_info && reflog_info->last_commit_reflog) { struct commit_reflog *commit_reflog = reflog_info->last_commit_reflog; @@ -310,7 +310,7 @@ void show_reflog_message(struct reflog_walk_info *reflog_info, int oneline, struct strbuf selector = STRBUF_INIT; info = &commit_reflog->reflogs->items[commit_reflog->recno+1]; - get_reflog_selector(&selector, reflog_info, dmode, 0); + get_reflog_selector(&selector, reflog_info, dmode, force_date, 0); if (oneline) { printf("%s: %s", selector.buf, info->message); } |