Skip to content

Commit

Permalink
Merge branch 'jk/reflog-date'
Browse files Browse the repository at this point in the history
* jk/reflog-date:
  improve reflog date/number heuristic
  • Loading branch information
Junio C Hamano committed Oct 9, 2009
2 parents 170a481 + f4ea32f commit 302e99b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion log-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion revision.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 302e99b

Please sign in to comment.