Re: [RFC PATCH 0/4] git log -g --pretty=format: learns about reflog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 25, 2009 at 11:44:03PM -0500, Deskin Miller wrote:

> I'm a little leery of using commit->util to carry the reflog info, but I
> didn't see a much better way, without altering the signature of
> pretty_print_commit to take an optional reflog parameter.  The code

Personally I am not opposed to some refactoring of the pretty_print
code. A few months ago I wanted to add a new pretty-printing
feature (it was keeping count of the total and printed patches, so you
could say something "Patch %count/%total"). Passing information around
through all of the functions got quite burdensome, and I started a
refactoring to have a "pretty_print_context" that could be passed around
and contain a lot of the pseudo-global variables.

I didn't get very far before giving up and working on something else.
But my point is that any refactoring you do may end up helping other
features in the future.

As a side note, I also think figuring out what the formats look like by
reading the pretty-print code is insane, because it is a mass of special
cases and switch statements on format. I think it would be much more
manageable "inside-out": each format has its own primary function, and
the common stuff is factored out into helpers.

But that's just based on memory from a few months ago.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux