From: Thomas Rast Date: Wed, 14 Oct 2009 09:58:34 GMT Subject: Re: [RFC PATCH 2/5] Introduce new pretty formats %g and %G for reflog information Message-ID: <200910141158.35050.trast@student.ethz.ch> In-Reply-To: <20091014045918.GA31810@coredump.intra.peff.net> Jeff King wrote: > 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