diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-10-09 16:26:11 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-10-09 16:26:11 -0700 |
commit | 302e99b79a47e55274c9ba91bb7ac9d5d6292925 (patch) | |
tree | 30f47b6b1a8e12cf394d49c2f5154ce376912129 | |
parent | 170a4814d382e79ea774813c99f12bb2a2922776 (diff) | |
parent | f4ea32f0b48bc300afcb7c980c5a294deba31daa (diff) | |
download | git-302e99b79a47e55274c9ba91bb7ac9d5d6292925.tar.gz |
Merge branch 'jk/reflog-date'
* jk/reflog-date:
improve reflog date/number heuristic
-rw-r--r-- | log-tree.c | 4 | ||||
-rw-r--r-- | revision.c | 2 | ||||
-rw-r--r-- | revision.h | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/log-tree.c b/log-tree.c index 1c9eefee33..1618f3c79a 100644 --- a/log-tree.c +++ b/log-tree.c @@ -390,7 +390,9 @@ void show_log(struct rev_info *opt) */ show_reflog_message(opt->reflog_info, opt->commit_format == CMIT_FMT_ONELINE, - opt->date_mode); + opt->date_mode_explicit ? + opt->date_mode : + DATE_NORMAL); if (opt->commit_format == CMIT_FMT_ONELINE) return; } diff --git a/revision.c b/revision.c index 35eca4a361..9fc4e8d381 100644 --- a/revision.c +++ b/revision.c @@ -1159,8 +1159,10 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg revs->simplify_history = 0; } else if (!strcmp(arg, "--relative-date")) { revs->date_mode = DATE_RELATIVE; + revs->date_mode_explicit = 1; } else if (!strncmp(arg, "--date=", 7)) { revs->date_mode = parse_date_format(arg + 7); + revs->date_mode_explicit = 1; } else if (!strcmp(arg, "--log-size")) { revs->show_log_size = 1; } diff --git a/revision.h b/revision.h index 9d0dddbcbc..b6421a6432 100644 --- a/revision.h +++ b/revision.h @@ -81,7 +81,8 @@ struct rev_info { show_merge:1, abbrev_commit:1, use_terminator:1, - missing_newline:1; + missing_newline:1, + date_mode_explicit:1; enum date_mode date_mode; unsigned int abbrev; |