From owner-freebsd-git@freebsd.org Thu May 30 13:34:32 2019 Return-Path: Delivered-To: freebsd-git@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7145315C2F91 for ; Thu, 30 May 2019 13:34:32 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A56648AB22 for ; Thu, 30 May 2019 13:34:31 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f44.google.com with SMTP id w25so5026674ioc.8 for ; Thu, 30 May 2019 06:34:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UihjCwbWcCINiJ0LpYEwOt+12bcNHEndGCHPqn751c4=; b=RudTTv5G3PABgMBRgtRxzvXljq4rYT3av1iNwBvQrsf2NBEMjpv9D0+5ag6OSiqE5x evjdraMxB9Xunwz/rjVMytZV1bNyaAArMzA9QVOk2LDqUITQtyl2+J9I7U63VzN5TKnF cBEtefTy+doRmbgA13PDaJzvwd05PVRxTKBGpcvRtZdx7QNG2/EGEGD6a9ac9SrU51se AqW2zlVU6QHwCNdlPLz+7PNba7bH1gqKAt0siaGjcvM65Mh/Jas6U0ZblfzpB1m7mazL ivKL00xa0MPxNGpeCmHNKnK7vkMSBUOIldbuqyMROZ19BQR9iWAHYY4wThVtKZ2EJEHF uBxQ== X-Gm-Message-State: APjAAAWyQojN4RmoaDkTiz0kJBznb+bSWZ06YJSeG+Yt1n6aemtMKrrd R4gxLwBxWxFEPkGHa0gBGcsmg76J6ycObq2l7r6zDyJN X-Google-Smtp-Source: APXvYqxCdUidFFMxxLP16U6UrXEVWdgdLM+Ew44xQvicodkCp20HIvgVfSxGqIYU2+2WMbbGQ7YB6yMDbBK6QPwG0E8= X-Received: by 2002:a6b:5b01:: with SMTP id v1mr314996ioh.120.1559223265122; Thu, 30 May 2019 06:34:25 -0700 (PDT) MIME-Version: 1.0 References: <8697933A-B813-4088-90B7-A84589C3CD33@freebsd.org> <6fb4c8cb-7f59-872e-4de6-a8a02e7c4e29@gjunka.com> <82938a26-892e-0459-aa23-bdcd9e318b6c@gjunka.com> In-Reply-To: From: Ed Maste Date: Thu, 30 May 2019 09:34:11 -0400 Message-ID: Subject: Re: Git handling of commit times To: Grzegorz Junka Cc: freebsd-git@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: A56648AB22 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.44 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-5.32 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-git@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[44.166.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; IP_SCORE(-2.33)[ip: (-5.90), ipnet: 209.85.128.0/17(-3.38), asn: 15169(-2.29), country: US(-0.06)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 May 2019 13:34:32 -0000 On Wed, 29 May 2019 at 22:34, Grzegorz Junka 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.