Re: [PATCH] Add a --dateformat= option to git-for-each-ref

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

 



On Fri, Sep 28, 2007 at 03:15:58PM +0100, Andy Parkins wrote:

> > like a sane way to implement these sorts of things (e.g.,
> > "%(objectsize:human)", "%(parent:1)", etc).
> 
> I'd thought about doing it like that, but imagined that there would
> objections that it was overcomplicating git-for-each-ref.  As you
> think that's acceptable, I'll do it.

Well, I'm not sure my opinion counts for much, but at least there are
now two of us. :)

> A patch series that implements both your requested changes to follow.

Patches 1/2 look fine to me (but I agree with the squash suggestion).

3/4 are not exactly what I had in mind, but I think are reasonable in
this case. Rather than treating it was ":format", I had imagined more of
a ":attribute1:attribute2" style, where some attributes may be
understood by all substitutions (e.g., the moral equivalent of shell's
":-" and ":+"), and some only by some substitutions (such as date
formats). And on top of that, these sorts of substitutions should be
unified with the --pretty=format machinery.

Of course, that is a much larger task and you probably just want to do
your date formatting and get your other work done. So I think your
implementation is reasonable, in that it accomplishes what you want in a
reasonable amount of code, and its syntax doesn't prevent moving towards
what I described above (since %(foo:bar:baz) is currently nonsensical,
we would be free to adapt its meaning later).

So in a very verbose way,

Acked-by: Jeff King <peff@xxxxxxxx>

-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