From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: More build times Date: Sat, 25 Jun 2022 21:34:45 +0700 Message-ID: References: <87czexj5tg.fsf@gnus.org> <87pmiwj1st.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6091"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 25 16:36:24 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o56tb-0001Rx-Mt for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Jun 2022 16:36:23 +0200 Original-Received: from localhost ([::1]:33086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o56ta-0001eQ-J0 for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Jun 2022 10:36:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o56sK-0000KV-FP for Emacs-devel@gnu.org; Sat, 25 Jun 2022 10:35:04 -0400 Original-Received: from mail-yb1-xb2a.google.com ([2607:f8b0:4864:20::b2a]:37782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o56sI-0008Uw-Hu for Emacs-devel@gnu.org; Sat, 25 Jun 2022 10:35:04 -0400 Original-Received: by mail-yb1-xb2a.google.com with SMTP id p136so3082493ybg.4 for ; Sat, 25 Jun 2022 07:34:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=b8Fftum0YL/ex1hZLUP4cXjN8l0UmdD+3g9Qh4eWfAM=; b=TL4c3+uJyvSIT7NRAMwmPEPrprswGm7h/JXReKs7FtNqZSDjWqWExf2eIMp2k6j11z ZwlvxCfaK5ZTeKeTgUU/C2xj5U4wMAzmGT3ZzE9/G+NetyZPpIFfprLl11Rc7NeH0GCy 6je5+1+iRFOwktZLJt/Z3MCEFExQvMSKiJdyM5AwWXzL/pK2xJUWwEio8mYVcPcfcN7O qMnDBGrnmH19vylPkUGBjx9Vyoe5tReEVzfOWnff9gvpTqtRqu7xEELxTK1lhz7e9V0u s7dn18cAv0j9+rnWY0o2FLToMtHR2cliyHwklsU8i6vPmq6agRqVFbm/8oPm5pScBNAr LsoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=b8Fftum0YL/ex1hZLUP4cXjN8l0UmdD+3g9Qh4eWfAM=; b=aIdjpGwMqe0NMHLxhdaxy2dje1T3KcHG9EXK5LkECHFgGmOG+dJfRFdMoU+f/5iV7q RhqQjkDGdn1l7xA3kuS/6N/3AfF3OBKL0iQA/+ck9fb7RCVWgq7YM+A2CoQMMzHKTYuH ehj/8rW89ndP51waijdcQ8WdeaYEI7Z/ZWbXevtY82q0l08U3Fu2Wf+aPr2TrOsskIRx RTEw8L45J6AhjqSq0zK/9zjlE5SF9oH2VNa5Kxhb5F5irf7Otc+nPdQ311vtWKgVxqiW C8fCB52o0e0WngPidoYq4JE7jgQcmo1i69CG1ZJ67YFXHp2hQWdcXAWG7nHUw8fInVU6 O+nQ== X-Gm-Message-State: AJIora9i3xB6VXCN1OHNZT56kbRfrcyAuCSwRY5ai91gUGfi7KF5tRTq ZZQ05e2zgRrpbf3axEWyScfkz71nAPSJ98BpRfnUQOU4RKaKxg== X-Google-Smtp-Source: AGRyM1sqOHS9Tt2xo2GTjigqvlxNq1md6MgxrR0VHWceOJBuNuAjkYHLtfZasHzeTNdI8RXRq4Nxf2Nj1at8hMTznuY= X-Received: by 2002:a25:6f86:0:b0:669:22f7:b94f with SMTP id k128-20020a256f86000000b0066922f7b94fmr4585826ybc.327.1656167696717; Sat, 25 Jun 2022 07:34:56 -0700 (PDT) In-Reply-To: <87pmiwj1st.fsf@gnus.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::b2a; envelope-from=yurivkhan@gmail.com; helo=mail-yb1-xb2a.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291604 Archived-At: > It's a git artefact. For instance, this is what "git log" says: > > commit 61a312ba0cae10e8e19b7424540751a71d0170b1 > Date: Fri Jun 17 10:24:05 2022 +0800 > > commit f419de6eca4ca6a6d03db1eec4b9086a3d1e5b86 > Date: Thu Jun 16 09:48:05 2022 +0200 > No intervening commits or anything, but checking out f419de6eca and > 61a312ba0c give you vastly different trees -- presumably because of > merges and the like (since f419de6eca4 originated in emacs-28). Yes: $ git fetch $ git log --oneline --graph --decorate --date-order origin/master [=E2=80=A6] * | | cce197c630 Fix instances of not using a usable Motif drag atom * | | d1a10a1cf2 Merge from origin/emacs-28 |\| | * | | a8cf6567dd Improve window manager user time reporting mode switch= ing =E2=86=92 * | | 61a312ba0c Update last event time during DND operations =E2=86=92 | * | f419de6eca * lisp/textmodes/artist.el: Minor doc fixes. * | | e75ce9ca38 * src/fns.c (Fmapconcat): Optimize the case where separator=3D=3D"" * | | cd9b920217 Fix Tramp test [=E2=80=A6] The two commits are adjacent in date order but live on different branches, one having been merged into the other a couple commits later. > Is there a way to make git cough up the commit on the master branch for > a specific date? I.e., "what was the state on the master branch at > Fri Jun 17 06:30:35 2022 +0200"? Not really. In Git, commits do not store the information about the branch they were originally committed to. Branches keep timestamped reflogs so you can ask them where they used to point at certain moments of time, but, for remote tracking branches, that depends on how regularly you update them (do a =E2=80=98git fetch=E2=80=99). For example: 1. You have a clone of a repository as of 2022-05-16. Its origin/master points at commit A. 2. On 2022-05-17, someone pushes commit B. 3. On 2022-05-18, someone else pushes commit C. 4. On 2022-05-19, you do a =E2=80=98git fetch=E2=80=99. Now your remote tracking branch origin/master points at the commit C, and the last two records of its reflog are =E2=80=9Con 2022-05-19, I moved from A to C as a result of a =E2=80=98git fetch=E2=80=99=E2=80=9D and =E2= =80=9Con 2022-05-16, I moved from [=E2=80=A6] to A as a result of [=E2=80=A6]=E2=80=9D. =E2=80=98git rev-list -n 1 --before=3D origin/master=E2=80=99 will gi= ve you *some* commit that is reachable from origin/master and was committed before the specified date, but it might be from a branch that was merged later than that date. What you can do is =E2=80=98git rev-list -n 1 --before=3D --first-par= ent origin/master=E2=80=99 and hope people don=E2=80=99t do things like =E2=80= =9Cfirst merge master into my feature branch, then fast-forward master to the resulting merge commit=E2=80=9D because this messes up the order of parent links in the merge. Compare the above commit graph with the following: $ git log --oneline --graph --decorate --date-order --first-parent origin/master [=E2=80=A6] * cce197c630 Fix instances of not using a usable Motif drag atom * d1a10a1cf2 Merge from origin/emacs-28 * a8cf6567dd Improve window manager user time reporting mode switching =E2=86=92 * 61a312ba0c Update last event time during DND operations * e75ce9ca38 * src/fns.c (Fmapconcat): Optimize the case where separato= r=3D=3D"" * cd9b920217 Fix Tramp test [=E2=80=A6] Note that f419de6eca is nowhere to be seen. It is only reachable from origin/master over the second parent link in the merge d1a10a1cf2.