Re: [PATCH] pretty format string support for reflog times

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

 



Jeff King <peff@xxxxxxxx> writes:

> I actually think Phil's patch from today is a little cleaner for most of
> these, as it returns the values via out-parameters, and uses the return
> value for "did we get anything?".

True.  That part of the interface is indeed better done with the new
one.

I am still in favor of this suggestion you earlier made:

> So the final solution is more like:
> 
>   - a formatter for just the reflog time, respecting date
> 
>   - a formatter for just the reflog index (the "0" in HEAD@{0})
> 
>   - a formatter for the ref name (just the "HEAD" in HEAD@{0})

though.  After all we only need three short ones while we migrate
away to a longer %(reflog:<what>) format, right?

As to the unfortunate %gd that squats on the "date" other specifiers
use, I do not see a good/quick approach to migrate it.  If our ideal
short-term endgame before the longer format were to use %gd, %g# and
%gg for the above three, we first start warning people who use %gd
for the historical mistaken "reflog selector", while telling people
to use "%gg@{%g#}" instead if they truly want "reflog selector", and
then switch its meaning to "reflog date".  That would take a long
time.

As %r prefix is not taken, we can immediately deprecate %g-anything
format as a historical mistake and make sure we do not repeat the
mistake of giving "d" to "reflog selector", perhaps?
--
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]