From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OJXRJO92GGA2QAAA0tVLHw (envelope-from ) for ; Mon, 01 Feb 2021 21:47:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 4KNlIO92GGDkbwAAB5/wlQ (envelope-from ) for ; Mon, 01 Feb 2021 21:47:27 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 04BD6940481 for ; Mon, 1 Feb 2021 21:47:26 +0000 (UTC) Received: from localhost ([::1]:47616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6h2b-00012v-Uw for larch@yhetil.org; Mon, 01 Feb 2021 16:47:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6h2J-000124-0j for guix-devel@gnu.org; Mon, 01 Feb 2021 16:47:08 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:43175) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6h2G-0004mF-Ux for guix-devel@gnu.org; Mon, 01 Feb 2021 16:47:06 -0500 Received: by mail-wr1-x42d.google.com with SMTP id z6so18196192wrq.10 for ; Mon, 01 Feb 2021 13:47:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=AX0zNd3H23B0YahlitsbIyW+/yW37EeFJdRYe1HrH9Q=; b=uENo+T7Y90Qub4IGzl6LPhaxrE/QWbNgDpFg0hMs5fnwiN4BWLpP9QeFTmN1gJbNNV LKXSqrNdwx6mAGl3oi/KmWkwJ+5MGQ9H+RpXQ31V9C+7N475qUzQU/Y92pnxJcbYRQdT YctVWYeAUz+gDbNQ1jq4TKq6VLiYMdw/EFlQF3OoPsquiIz1Ni4CWP4fouV8Q14mvSwM RFXZ5MRqO1zaOac+luWKMMfAmkGl0SmvL2i/KoveSvHMtMaIWXo7iaV9lqyCcnjDqeL/ 0Gaj1TOgbULYXzSivD/f/zIoAl7g+peCpDhpnRnWCrGmEHOWV/SDeOKkDYzj2AiuuDZC XZ7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=AX0zNd3H23B0YahlitsbIyW+/yW37EeFJdRYe1HrH9Q=; b=N3HWEvUlgx+3EEZ7LfpMu+k/xvt8E5xHMTDSV6eLUHyCl1/3q4RyFL2bdirP5zUkdP AbHcJuHkAoK1fFhJLVXUjgPR061370qpjYgP1WYeofc4FSAa8Y+O4rv6l3JBcon+mGQ6 mxQ4A3gE2Jgr6OM8fIBpYZDarz5zVCt096UWAVnnpD+mGiADNFbkiSJq/nyTVUYJQqLH +gDyHmMfHa5UMOByUmlo4RdHCtz3dwFQIhQC1KfsWbE/yJCjT/aCWmjLQkMSqpqUy0za 0csg+8POb4gP3evV9RXiK8oBfTr0wCjxDYI/kNBErbWaqcgiSEN8hBZq11MTy2uJWBDB YnFQ== X-Gm-Message-State: AOAM532qqItOmsNpx+WBxWN39wCKrlrr8Bj3n3V02QLsilva4+ohwcf2 ecomZSiIk1r+Nlyj8xaV+tu7VqT6tRU= X-Google-Smtp-Source: ABdhPJw5GEujCWkiuiy0KePyWiKPxX6bi28NN2BPG/lgON5Da/0WMZe8V2iNF9g5u4U/laYnEkbVuA== X-Received: by 2002:adf:f9cb:: with SMTP id w11mr20335371wrr.199.1612216023457; Mon, 01 Feb 2021 13:47:03 -0800 (PST) Received: from lili ([88.126.110.68]) by smtp.gmail.com with ESMTPSA id v1sm513386wmj.31.2021.02.01.13.47.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 13:47:02 -0800 (PST) From: zimoun To: Christopher Baines Subject: Re: [outreachy] =?utf-8?Q?=E2=80=9Cguix?= git log =?utf-8?Q?--dat?= =?utf-8?Q?e=3D=E2=80=9D?= In-Reply-To: <87lfc7frmq.fsf@cbaines.net> References: <8635yfefge.fsf@gmail.com> <87lfc7frmq.fsf@cbaines.net> Date: Mon, 01 Feb 2021 22:44:58 +0100 Message-ID: <86zh0ncvj9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.26 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=uENo+T7Y; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 04BD6940481 X-Spam-Score: -1.26 X-Migadu-Scanner: scn0.migadu.com X-TUID: c2Yt7B6VWPUF Hi Chris, On Mon, 01 Feb 2021 at 20:41, Christopher Baines wrote: > zimoun writes: > >> As discussed today at our weekly meeting, it could be cool to add the >> option: >> >> guix git log --date=3DYYYY-MM-DD >> >> listing the first (resp. last) commit date of the day. Or maybe all the >> commits of the days. Using this information would be really useful to >> feed =E2=80=9Cguix time-machine=E2=80=9D. The use case I am interested = is to easily >> find the commit when I only know the date of publication/submission of >> the paper. > > I'd be a little careful about the implementation of this, commits have a > commit date, and author date, but neither of these things tell you when > commits were on a given branch. We are focusing on commit date, which is the one making sense. > Take the following commit for example: > f5f642058a3b6bf3eda5eb714ad5fa1f0a2b1b20 [1] > > Would it be shown when running the following? > > guix git log --date=3D2021-01-17 > > It's commit date is the 17th, so maybe yes? But this commit didn't > actually turn up on the master branch until the 18th, at least according > to the Guix Data Service [2]. Yes, for sure. It is difficult to rebuild aposteriori the exact date history. Well, merges increase the number of commit candidates, so the correct commit will be listed in the middle of other false positive ones. > Taking your paper use case, if I produce some results on the 17th, even > perhaps stating the time down to the second, and then you using the > commit date of commits try to reproduce the environment, you're going to > get some commits that I didn't have. I agree. The error rate (on average) depends on the number of commits per day (on average) vs the number of commits per day in other branches vs the number of merges of such branches. Well, I did not do the stats, so just guessing that the approximation is not so bad and the false positive are acceptable in practise. >From my understanding, you have right that the correct would be to take care about the merges of the =E2=80=99staging=E2=80=99 and =E2=80=99core-up= dates=E2=80=99 branches. But even without that, it is already inexact and an rough approximation. Let consider the last CRAN update for example, it is impossible to have the exact same environment knowing only the date, say 2021-01-20. --8<---------------cut here---------------start------------->8--- $ git log --pretty=3D"%cd %s" --before=3D2021-01-21 --after=3D2021-01-19 \ | grep 'r-' | grep Update | head -n1 Wed Jan 20 17:19:10 2021 +0100 gnu: r-fdrtool: Update to 1.2.16. $ git log --pretty=3D"%cd %s" --before=3D2021-01-21 --after=3D2021-01-19 \ | grep 'r-' | grep Update | tail -n1 Wed Jan 20 17:18:59 2021 +0100 gnu: r-foreign: Update to 0.8-81. $ git log --pretty=3D"%cd %s" --before=3D2021-01-21 --after=3D2021-01-19 \ | grep 'r-' | grep Update | wc -l 144 --8<---------------cut here---------------end--------------->8--- The same day, the user who pulled before 17:18 got a CRAN environment and the user who pulled after 17:20 got another CRAN environment. Without speaking about the one who pulled in the meantime. :-) > Approaches that work most of the time, or have subtleties that might not > be immediately obvious make me a little nervous. > > 1: > commit f5f642058a3b6bf3eda5eb714ad5fa1f0a2b1b20 > AuthorDate: Sun Jan 3 16:26:16 2021 > CommitDate: Sun Jan 17 23:07:29 2021 > > gnu: wxmaxima: Update to 20.12.2. > > 2: https://data.guix.gnu.org/revision/f5f642058a3b6bf3eda5eb714ad5fa1f0a2= b1b20 Aside, noting that the Data Service is also doing an approximation on the commit dates. It considers only batches of pushed commits and not all the commits individually. As explained for example here: Thanks for sharing your experience. Yeah, dealing with dates and Git is not as straightforward as it appears at first. I agree that maybe this first approximation is too rough and maybe not useful in practise because knowing the date is too vague. Cheers, simon