Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 May 2019 09:34:11 -0400
From:      Ed Maste <emaste@freebsd.org>
To:        Grzegorz Junka <list1@gjunka.com>
Cc:        freebsd-git@freebsd.org
Subject:   Re: Git handling of commit times
Message-ID:  <CAPyFy2Dc%2B4wdDJgJNxYh8F9R9CgijGO-kQ7gtX=awev_D3=bHg@mail.gmail.com>
In-Reply-To: <ddd946b2-315d-fd44-f82b-2cf894a86bd7@gjunka.com>
References:  <8697933A-B813-4088-90B7-A84589C3CD33@freebsd.org> <CAPyFy2Bqg6m8D6rO%2Bg87Wk74iBYOGfq%2B=t6B_VhUM26mUZXO%2BQ@mail.gmail.com> <6fb4c8cb-7f59-872e-4de6-a8a02e7c4e29@gjunka.com> <CAPyFy2CkyET7v6hTfhv8ZQ=%2BSYM_yyhtBwzM3GfS3funaDBZHQ@mail.gmail.com> <82938a26-892e-0459-aa23-bdcd9e318b6c@gjunka.com> <CAPyFy2Dm9yWepO6P8jyF%2BNZDA=ZUpg0tYUQ8zRTAKkVWp6cHhw@mail.gmail.com> <ddd946b2-315d-fd44-f82b-2cf894a86bd7@gjunka.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 29 May 2019 at 22:34, Grzegorz Junka <list1@gjunka.com> wrote:
>
> The time when the commit is made is not related to when it's pushed to
> the remote. I am saying that for this to work the hook on your laptop
> would need to check the time on the server when the commit is being made
> locally (e.g. on a train).

Yes, the commit time is not related to when it's pushed. But you still
don't need any external access at the time of commit; perhaps I've
been unclear about requirements. The goal here is to ensure that
timestamp ordering matches commit DAG ordering, not that the
timestamps are "correct" for some definition thereof.

Let me try to clarify the two example cases:

> The commit could be made, say, with tomorrow's date, but pushed to the
> remote next week.

That case is fine - if you have a post-dated commit that's not yet
part of the canonical tree there's no issue; it's not possible for
someone else to create another commit as a child of yours. The
discussion here is about the view of commit dates in the canonical
repository and a potential commit hook to enforce rules on those; it
does not matter at all what's in a private repo.

> Equally, the commit could be made
> with yesterday's date and if HEAD is a week ago this again wouldn't be
> caught.

That's fine too - as long as the commit is after its parents it's fine.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2Dc%2B4wdDJgJNxYh8F9R9CgijGO-kQ7gtX=awev_D3=bHg>