Date: Fri, 20 Nov 2020 18:03:26 +0100 From: Mathieu Arnold <mat@freebsd.org> To: Dan Langille <dan@langille.org> Cc: freebsd-git@freebsd.org Subject: Re: Monitoring commits on all branches Message-ID: <20201120170326.4k6sj7tt35lrjtaz@aching.in.mat.cc> In-Reply-To: <BE9B078D-633B-4340-9A79-03B0FA60C431@langille.org> References: <197541CC-FEA7-4B4C-936E-66A5625BB64C@langille.org> <3c9f6285-ae7c-1062-2dd3-42f8c953a230@gmail.com> <BE9B078D-633B-4340-9A79-03B0FA60C431@langille.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--45wtwjfwliaf7fev Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 19, 2020 at 02:00:36PM -0500, Dan Langille wrote: > Mathieu mentioned: git log $foo_hash...branch_name >=20 > That was the first time I've seen that used. All previous suggestions wer= e HEAD, not branch_name. But they are all the same in this context? HEAD is an alias for "whatever is currently checked-out right now". HEAD usally points to a branch that you work on, but if you git checkout some-commit-hash you get in a "detached HEAD" state where HEAD does not point to a branch but to a specific commit, and it can lead to you loosing new commits if you work from there and are not careful.=20 > * Polling git >=20 > It is beginning to sound like the FreshPorts git code for detecting incom= ing commits will be: >=20 > Every N minutes, do this: >=20 > for each repo in REPOS > for branch in BRANCHES > cd to the directory for that repo > git checkout branch > git log $branch_last_hash...HEAD Those two should probably be `git log $branch_last_hash...$branch_name`, you don't actually need to checkout the thing. > for each of those commits > process the commit > end for > end for > end for >=20 > At present, the REPOS and BRANCHES are: >=20 > * freebsd BRANCHES=3D"master branches/2020Q4 branches/2020Q3 branches/202= 0Q2 ...etc" > * freebsd-ports BRANCHES=3D"master stable/12 stable/11" > * freebsd-doc BRANCHES=3D"master" Those should probably not be static but should probably be parsed from, for example, `git branch -a`, possibly with a --format to be easily parsed. --=20 Mathieu Arnold --45wtwjfwliaf7fev Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEVhwchfRfuV0unqO5KesJApEdfgIFAl+39tlfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDU2 MUMxQzg1RjQ1RkI5NUQyRTlFQTNCOTI5RUIwOTAyOTExRDdFMDIACgkQKesJApEd fgIsehAAg7Sk6N6kOOBX8dipQ8xmZbji5h6zon3LaM2uQczvcOqRw3RKfQO0a6ye ngCGvWLT5yacCQb60SjMP1CiySGpoXxV3F7t+6GyQchBdHhtndzKExpPBisKRwtb jUtcro1vTUR21kAeN9XPU6Yp3fFUTqjiofZCzdUD/SMdzzKDH2YyQHxsAIEvWvTP dHLtJ6RdsW0mql/+ERVMkDKfJnIN8xCuonPz9Cww+xAL0oFpxtCPBkww9L/kJneg aY+XJ6o5qN6PU63PzkypH+pcLYdGqiOkvBV84BxTei2YYejmucs5tv6b7egEgdkr cN5QhgJ3Uye5jIgnj+i7tZrpe0sIP2D75TWRHWZZdN5ZUqZsZSh5tPYi3RGtR4pj /uKZqQWL8NI87z6+Ka/vW6k9TRljjg3aH1KmKWKi0GEzcS8sTiLC+uAxqaAPTQd8 hG5ijTypkqqHq+a/8CRY+WsKe80Vb+3/nrgeWStO6c72g06QuNCuX01s1YcrXsjj ENb6KHidaZiUUb8bvxIRh1nZ+DlDwZAZeZsplwkonZ7DtKdDp6cclDcVohdrYgKV H33yqkyQU3H27nIuM6fBqkid7Eme7pQ4wxF5T1ApLPQK6EHvcXIov4ohTqOO/JBT Wy2/mrx5M7p3bxBm0n2FnCBWcwBiTPAF3eJuMOBRnHeBUulP0rU= =YgJs -----END PGP SIGNATURE----- --45wtwjfwliaf7fev--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20201120170326.4k6sj7tt35lrjtaz>