Re: [PATCH] t1500: ensure current --since= behavior remains

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

 



On Wed, Feb 10, 2021 at 09:55:43PM +0000, Eric Wong wrote:

> This behavior of git-rev-parse is observed since git 1.8.3.1
> at least(*), and likely earlier versions.
> 
> At least one git-reliant project in-the-wild relies on this
> current behavior of git-rev-parse being able to handle multiple
> --since= arguments without squeezing identical results together.
> So add a test to prevent the potential for regression in
> downstream projects.

I had to read this a few times to understand what "this behavior" meant.
It is just: when given multiple --since options, output a --max-age for
each of them, even though internally, Git's revision traversal will only
use one (in the usual last-one-wins fashion).

I'm not sure if I was just being dense, or if this could be spelled out
more clearly. :)

Out of curiosity, why does the other project want that? From your
mention of libgit2's git__date_parse(), I assume it's something that
wants to parse approxidates into timestamps in a script. Maybe we ought
to provide a more direct and robust way of doing that. We have a similar
need in t0006, but we use a test-helper program for it.

(I have no problem in the meantime with this patch, though; any new
method for accomplishing this would want to give other projects time to
adapt to its use).

-Peff



[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