From owner-freebsd-git@freebsd.org Tue Aug 18 07:44:37 2020 Return-Path: Delivered-To: freebsd-git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FE703B243F for ; Tue, 18 Aug 2020 07:44:37 +0000 (UTC) (envelope-from adridg@freebsd.org) Received: from lb2-smtp-cloud9.xs4all.net (lb2-smtp-cloud9.xs4all.net [194.109.24.26]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.xs4all.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BW2xD4p1vz4sT8 for ; Tue, 18 Aug 2020 07:44:32 +0000 (UTC) (envelope-from adridg@freebsd.org) Received: from cust-d4a83f22 ([IPv6:fc0c:c11d:cecc:f58a:eaa1:c0:9d8f:c143]) by smtp-cloud9.xs4all.net with ESMTPA id 7wIBkSJJ8uuXO7wICkaWlP; Tue, 18 Aug 2020 09:44:24 +0200 From: Adriaan de Groot To: freebsd-git@freebsd.org Subject: Re: FreshPorts & src commits to branches Date: Tue, 18 Aug 2020 09:44:17 +0200 Message-ID: <3430278.PbzQmE3shN@beastie.bionicmutton.org> Organization: FreeBSD In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3214470.i0SyIzU0eP"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-CMAE-Envelope: MS4wfIBaHpQOKqzrH3r7u4/L9XGrRwfUQVwM+TV70nAHv7OZVJjseE2XKIHx3FXeuXUXRHeFYzJL57uxEJdHKY8xQZQDF9g+dBEH0AKdtLQhPEUgcobgaiuu 42gZJcMqa/AWeed1GhPn2KSUfbJZ1s+vM1cEl3ilFdEKADVVbH50u44o29M4vegpdadnMJlzAKthwWY65nYGTVC6thI0u/scTP0= X-Rspamd-Queue-Id: 4BW2xD4p1vz4sT8 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL] X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.33 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: Tue, 18 Aug 2020 07:44:37 -0000 --nextPart3214470.i0SyIzU0eP Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" On Tuesday, 18 August 2020 03:19:26 CEST Dan Langille wrote: > I am quickly realizing that in order for FreshPorts to track src commits it > needs to query every branch. There does not seem to be any other way to > know that a commit ocurred on stable/12 without a checkout of stable/12 If you have the full repo (e.g. a normal clone) then you might be able to use something along this line: git log --branches --since 2020-08-16 --source --raw | grep ^commit (the important bit is --branches to include all of them, and --source to include the source). I don't have a FreeBSD repo at hand, but my work-repo (which currently has some other branch checked out) gives me this kind of output: commit 36cefe3be10c707a2cdfaedd14fddee5cda31f50 hotfix-3.2.28.2 commit eb44d0c6be18c1ced99d5a8c1b1a6a1a0e653be2 hotfix-3.2.28.2 commit 24efce0c1d5601a77ad2b919cf0cf387231add76 calamares commit 5db4195b7e3e507a34f84e041b15a4aa86ed32da hotfix-3.2.28.2 commit 34946ecdee90584caf255fcca732c021e1dc1832 hotfix-3.2.28.2 commit 1a7b2668dc1e341b493990b99e9a0cc4530d32cd hotfix-3.2.28.2 This gives me branches for each commit hash in the given range. The branches you see mentioned here diverged before the date range given. I can't say anything about performance, here -- my little test repo only has ~8000 commits going back six years. (Turning this command-line into a collection of libgit calls is left as an exercise for the reader) [ade] --nextPart3214470.i0SyIzU0eP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEhrjttu2OP5apuuy1z93JbxKxkVwFAl87htEACgkQz93JbxKx kVy9Twv/T9E4ML2kx2hd081U1ZE6g9xpKMuBd/ufTN22eZhNc4FujjQ0odrr5qy3 XHpkdh7I3eN24koyWuEqvNuHf2JqqPFydBAFetttJ7LvMJ285G6aU9BF5sq3dAjw aH7L8W9F94jQr2Ri9eLhR1SlULQaVzS/iw1shI6EzhLtzsqTn6XVib23T0LbU2V+ RAeab7VZF1tmZQ2v9ymq6JHdxLWN+GctIfAYBZwWvX5rXJ4tYvumHaZHZwG+u9Q8 H+PmhgN3QoTk6LIavwBC1JwauxGPRlJIp7azZlaqt2pnOrkBv/hDwqZ+f/EiQN+R dsAS1KYlZBhd3RQd+COf7kqgqMw/RrIvDzOLal2TFG4y9R6Uq7GpgOdFN4AhW4jE sMePECsWcOLLhWmKZ1EFv3iL+N7fJ9o43QB00jtIr4ewJXh9KArH1JBykFcTJE3s LnxQ9LQgvXiNe7/r3Xo9utO4RBBRS1Hb5icdA+nSevFXqHhs48AOfDPAcmPxI24s fUOIqRGe =MKKb -----END PGP SIGNATURE----- --nextPart3214470.i0SyIzU0eP--