Re: [RFC PATCH 2/5] Introduce new pretty formats %g and %G for reflog information
Show 16 quoted lines
> On Mon, Oct 12, 2009 at 11:06:04PM +0200, Thomas Rast wrote:
>
> > Unfortunately, we also need to pass down the reflog_walk_info from
> > show_log(), so this commit touches a lot of (unrelated) callers to
> > pretty_print_commit() and format_commit_message() to accomodate the
> > extra argument.
>
> A while back I wanted to add a feature to pretty-printing, and I ran
> into the same situation (though my feature never made it to the list).
> We really end up passing around the same arguments over and over. Maybe
> it makes sense instead of adding another argument to refactor into a
> "pretty_print_context" struct that contains all of the arguments and
> current state.
>
> It would be an even more invasive patch, but I think it would make
> things more readable, and make future changes much easier to see.
Ok, I'll try for the next round.
--
Thomas Rast
trast@{inf,student}.ethz.ch