Date: Thu, 19 Nov 2020 09:52:23 +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: <20201119085223.nsrp2e45oyepsvds@aching.in.mat.cc> In-Reply-To: <197541CC-FEA7-4B4C-936E-66A5625BB64C@langille.org> References: <197541CC-FEA7-4B4C-936E-66A5625BB64C@langille.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--qoacccmzawas6bhq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 18, 2020 at 08:49:46PM -0500, Dan Langille wrote: > How can a repo be monitored for commits on all branches? >=20 > I know how to ask a given branch: do you have any commits after foo_hash? >=20 > How do I: >=20 > * get a list of all commits since foo_hash All commits on the branch foo_hash is: git log $foo_hash...branch_name > * know which branch each of those commits was on (e.g. master, branches/2= 020Q4) You will need to keep track of the latest commit on each branch separately, because there is absolutely no relation or ordering possible between branches. You could be tempted to use `--since <date>`, but you cannot, because as git is distributed, commit dates are by no mean increasing as you get to the tip of the branch. For example, I work on something on a private branch, commit it, and open a review, a few days pass, the review gets accepted, and I then rebase my one commit branch on the main branch and git push. The latest commit on that branch will be mine, which has a date a few days in the past, the previous commit probably has a date a few hours ago. --=20 Mathieu Arnold --qoacccmzawas6bhq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEVhwchfRfuV0unqO5KesJApEdfgIFAl+2MkJfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDU2 MUMxQzg1RjQ1RkI5NUQyRTlFQTNCOTI5RUIwOTAyOTExRDdFMDIACgkQKesJApEd fgIOpA/9F+S267282jm5lt7yS82Ob1NlR/8zR8WoQHxXSrd1eriTU4ie56e23PAC N34Rb6+55A8mldAQvKNLNgzkXb3TqY62JiunXNbk72cz/dqmyMfJBbGAGJKxfbxG +ia1PQB66S9pmlsGH2gZCATAo3sRsHJ548M73HzdYc7/LBj/O4H2L9mQzAMk7LmI SvKGd3ytT+ABEmJEnhWEt5wCVZ8esmFtCeJK3gMXQCBeQsFbN17Yc9P+WqoY6ShC ineiQsjZ5pviIH52hCPqoXyByLXUMHHKqBTWpQHfauVjmsCFwOhM29AHmNcrv87m ocnyTXyVsqIm88iSsutp3+mQphtOOdjGff7KFML9r2eesVTQUANliivIdj/DrNqq S7+ePNMV4WUd4c1zt5E+dSBcaVQuwTlQk5ZBsTEQHW9iGe+l/wMYWSwUHidq0bxC A8zGXouvanpPP31q+bwUmaEGZYJ7w9EjOBCQx8RTlUV2t35Rwjf/5GMAcIO6rjhC bc3yJBOp+rQAw5aGbYFJB8ZORx658AQ0/rCny+cLk7/ibUzYd3zDl/EnoETgSQMp sBfBuNbh1P2W0rgNLCLzEjlCer2VluCx0XcNjeKM/5MedZB0D+TXPySaqSEMBW2v 2A81UAilVeL0V7SfnLZ+L7PU1zR3g7XpIB99ntMy2UYpofki+aw= =3JPV -----END PGP SIGNATURE----- --qoacccmzawas6bhq--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20201119085223.nsrp2e45oyepsvds>