Re: Small trivial annoyance with the nice new builtin "git am"
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jul 29, 2016, 00:32 UTC
- Message-ID
- <CA+55aFxMZAuY7NY6rSfrMVyEdLuZDHBTs97UUdfk9=yJL1iLjA@mail.gmail.com>
- In-Reply-To
- <20160729002140.GC9646@sigill.intra.peff.net>
On Thu, Jul 28, 2016 at 5:21 PM, Jeff King <peff@peff.net> wrote:
> > I do wonder if you would be happier giving each commit a "fake" > monotonically increasing time, so they are correctly ordered by commit > date.
No, that would be nasty, partly for the corner case you mention, but partly because I just think it's wrong to try to lie about reality.
The reason I noticed this in the first place was actually that I just wanted to take a look whether things had gotten slower or faster over time, and see how many patches per second I get from the patch-bombs Andrew sends me.
So getting real time was what I was looking for.
Also, before somebody asks: the reason git has always cached the "default time" string is because there's a reverse annoying thing, which is looking up time twice, and getting a difference of a second between author times and committer times just because of bad luck. That makes no sense either, and is actually why we have that "ident_default_date()" cache thing going on.
So we do want to cache things for a single commit, it's just that for things like "git am" (or, like Junio wondered, "git rebase" - I didn't check) we probabyl just just flush the cache in between commits.
Linus