@@ -276,12 +276,10 @@ main_open(struct view *view, enum open_flags flags)
276276{
277277 struct view_column * commit_title_column = get_view_column (view , VIEW_COLUMN_COMMIT_TITLE );
278278 enum graph_display graph_display = main_with_graph (view , commit_title_column , flags );
279- struct view_column * column = get_view_column (view , VIEW_COLUMN_DATE );
280- bool use_author_date = column && column -> opt .date .use_author ;
281279 const char * pretty_custom_argv [] = {
282280 GIT_MAIN_LOG (encoding_arg , commit_order_arg_with_graph (graph_display ),
283281 "%(mainargs)" , "%(cmdlineargs)" , "%(revargs)" , "%(fileargs)" ,
284- show_notes_arg (), log_custom_pretty_arg (use_author_date ))
282+ show_notes_arg (), log_custom_pretty_arg ())
285283 };
286284 const char * pretty_raw_argv [] = {
287285 GIT_MAIN_LOG_RAW (encoding_arg , commit_order_arg_with_graph (graph_display ),
@@ -415,8 +413,6 @@ main_add_reflog(struct view *view, struct main_state *state, char *reflog)
415413bool
416414main_read (struct view * view , struct buffer * buf , bool force_stop )
417415{
418- struct view_column * column = get_view_column (view , VIEW_COLUMN_DATE );
419- bool use_author_date = column && column -> opt .date .use_author ;
420416 struct main_state * state = view -> private ;
421417 struct graph * graph = state -> graph ;
422418 enum line_type type ;
@@ -510,16 +506,17 @@ main_read(struct view *view, struct buffer *buf, bool force_stop)
510506 break ;
511507
512508 case LINE_AUTHOR :
513- parse_author_line (line + STRING_SIZE ("author " ),
514- & commit -> author , use_author_date ? & commit -> time : NULL );
515- if (state -> with_graph )
516- graph -> render_parents (graph , & commit -> graph );
517- break ;
518-
519509 case LINE_COMMITTER :
520- parse_author_line (line + STRING_SIZE ("committer " ),
521- NULL , use_author_date ? NULL : & commit -> time );
510+ {
511+ bool committer_line = (type == LINE_COMMITTER );
512+ if ((opt_committer ^ committer_line ) == 0 )
513+ parse_author_line (line +
514+ (committer_line ? STRING_SIZE ("committer " ) : STRING_SIZE ("author " )),
515+ & commit -> author , & commit -> time );
516+ if (committer_line && state -> with_graph )
517+ graph -> render_parents (graph , & commit -> graph );
522518 break ;
519+ }
523520
524521 default :
525522 /* Fill in the commit title if it has not already been set. */
@@ -661,7 +658,7 @@ main_select(struct view *view, struct line *line)
661658static struct view_ops main_ops = {
662659 "commit" ,
663660 argv_env .head ,
664- VIEW_SEND_CHILD_ENTER | VIEW_FILE_FILTER | VIEW_REV_FILTER | VIEW_LOG_LIKE | VIEW_REFRESH ,
661+ VIEW_SEND_CHILD_ENTER | VIEW_FILE_FILTER | VIEW_REV_FILTER | VIEW_LOG_LIKE | VIEW_REFRESH | VIEW_COMMIT_NAMEDATE ,
665662 sizeof (struct main_state ),
666663 main_open ,
667664 main_read ,
0 commit comments