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

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

 



On Wed, Jul 27, 2016, at 09:58, Jeff King wrote:
> On Wed, Jul 27, 2016 at 04:14:14AM -0400, Phil Pennock wrote:
> > The reflog contains timestamp information, but these were not exposed to
> > `--pretty`.  Four of the six author/committer format string
> > second-letters were still available and copied, but `d`/`D` are taken
> > for reflog selector formatting.  So use `%gT` for "time" instead of
> > "date" mnemonic for using `--date=...` formatting.
> 
> Hrm. Since Ted was not cc'd, it is not clear to me whether this is
> coincidental or in response to the thread over in
> 
>   http://thread.gmane.org/gmane.comp.version-control.git/299201

Coincidental, I was unaware of that.  Sorry for the duplication.  Please
ignore my patch, I'm not going to even try to compete with Mr Ts'o.

I asked a friend who is a git developer why this wasn't available, he
said it would be fairly easy to do, I asked if he was trying to suck me
into contributing patches to git, he said yes.  I neglected to search
archives for myself.

Besides "two independent submissions in short space of time" as evidence
that this functionality is wanted, my real-world motivator was: `go get
$something` failed, until I told the Golang tooling to update
dependencies too; after that I wanted to easily see when the dependency
was last updated on my local system and ended up having to look at the
reflog on disk and manually convert timestamps.

> To summarize, I think the conclusion there was that we would go with at
> least the 't' and 'r' formatters in the short term.

'r' and one of the non-relative renderers are the ones I put into a
`[pretty]` item for my use.

> to get "HEAD@{0} ...rfc-date...", because the presence of "--date" is
> the trigger to switch the meaning of "%gd".

Yes, I went for completeness even though it led to some duplication, and
tested them all. Though it looks like I didn't include the --date
modifications into the test-suite example.  Oops.

Thanks for the review and the cluebat.
-Phil
--
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]