Re: [RFC PATCH 2/5] Introduce new pretty formats %g and %G for reflog information
- From
Jeff King <peff@peff.net>
- Date
- Oct 14, 2009, 04:59 UTC
- Message-ID
- <20091014045918.GA31810@coredump.intra.peff.net>
- In-Reply-To
- <e0321a8af8d702d24ace33510daff22d02f4e116.1255380039.git.trast@student.ethz.ch>
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.
-Peff