From nobody Sun Apr 24 17:51:33 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AE78319998B5; Sun, 24 Apr 2022 17:51:47 +0000 (UTC) (envelope-from adridg@freebsd.org) Received: from dex.tacodewolff.nl (dex.tacodewolff.nl [83.96.200.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4KmbLV2lQVz4W57; Sun, 24 Apr 2022 17:51:46 +0000 (UTC) (envelope-from adridg@freebsd.org) Received: from beastie.bionicmutton.org (77-174-95-91.fixed.kpn.net [77.174.95.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dex.tacodewolff.nl (Postfix) with ESMTPSA id 038E661425; Sun, 24 Apr 2022 19:51:39 +0200 (CEST) From: Adriaan de Groot To: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org, "Tobias C. Berner" Subject: Re: git: aa2539679084 - main - framework: cleanup conditional-indentations in Mk/ Date: Sun, 24 Apr 2022 19:51:33 +0200 Message-ID: <7805992.iDzAj6rjnq@beastie.bionicmutton.org> Organization: FreeBSD In-Reply-To: <202204241007.23OA70ca039751@gitrepo.freebsd.org> References: <202204241007.23OA70ca039751@gitrepo.freebsd.org> List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2046993.x0N0T6uNKo"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Rspamd-Queue-Id: 4KmbLV2lQVz4W57 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 83.96.200.140 is neither permitted nor denied by domain of adridg@freebsd.org) smtp.mailfrom=adridg@freebsd.org X-Spamd-Result: default: False [-1.59 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEFALL_USER(0.00)[adridg]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[freebsd.org]; R_SPF_SOFTFAIL(0.00)[~all:c]; NEURAL_SPAM_MEDIUM(0.62)[0.618]; HAS_ORG_HEADER(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_SPAM_LONG(1.00)[0.997]; MLMMJ_DEST(0.00)[dev-commits-ports-all,dev-commits-ports-main]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:35470, ipnet:83.96.200.0/22, country:NL]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --nextPart2046993.x0N0T6uNKo Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Adriaan de Groot Date: Sun, 24 Apr 2022 19:51:33 +0200 Message-ID: <7805992.iDzAj6rjnq@beastie.bionicmutton.org> Organization: FreeBSD In-Reply-To: <202204241007.23OA70ca039751@gitrepo.freebsd.org> References: <202204241007.23OA70ca039751@gitrepo.freebsd.org> On Sunday, 24 April 2022 12:07:00 CEST Tobias C. Berner wrote: > The branch main has been updated by tcberner: > > commit aa2539679084872cd84112e9df6bfee571570623 > > framework: cleanup conditional-indentations in Mk/ > > These white space changes contribute greatly to the readability of those > files. As we have a version control system, finding out the reasons for the > changes prior to these white space changes is still easily possible This is a nice moment to point at "git blame" -- which will tell you when a line was last changed, and by whom. Naive use of "git blame" will now point a lot of lines at tcberner@, even though it was just whitespace. You can tell "git blame" to ignore certain revisions, and so discover the original authors before the white-space changes. ## Ignoring certain commits Step 1: Create a file that lists the commits to ignore, with one full hash per line. Some projects canonically name this file .git-blame-ignore-revs. So you could make one like this: echo aa2539679084872cd84112e9df6bfee571570623 > .git-blame-ignore-revs ## Using the ignore-file Step 2: Tell "git blame" to use that file for ignores. Actually, "blame" is kind of an unfriendly name. We should be cheering for the people who create the software we use daily! You can add an alias, one that calls "blame" with a suitable ignore-revisions-file. To do so, add this to your ~/.gitconfig (if there is alread an [alias] section, just add the second line): [alias] cheer = blame --ignore-revs-file .git-blame-ignore-revs This will make, say, "git cheer Mk/Uses/angr.mk" show only the non-whitespace changes from tcberner@ Step 2a: If you think "git cheer" is too corny, you can tell git blame to always use a particular ignore file: git config --local blame.ignoreRevsFile .git-blame-ignore-revs That sents the ignore-revisions-file for the current repository (e.g. for ports) to the given name, and means that you can "git blame" without seeing the whitespace-changes. There are projects that keep an ignore-revisions-file in the repository itself, for use when there are big cosmetic but non-functional changes. I have one in many of my repositories, for when I decide that the clang-format files need tweaking, or I realise that Python with 3-space indents is 33% faster than with 4-space indents. [ade] (occasionally kidding) --nextPart2046993.x0N0T6uNKo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEESUdADzdGoDiQC7F4Mo10LYgHpDUFAmJljiUACgkQMo10LYgH pDVgHAwAjyhtyRW0kjxgbK0yTP4AKlx1d+8cuZBuw+BzneJXWH49byBYeahrEt9m LmsNw5AOQXkUcocqlL6masjsj1AfxjuME6q+HCknp7zNurMNNXDC5uS6d7t+3OPt cbwWhLUvsA6OgoHl+lmSuc2HCGzAU/KW2vsQQPA69svljl24IyIowccftzS2e9yK 75wRac+Zff/uE/nXBDP8L/rq/hYLoaE0HeZSsRPghPVJcgX70hfn3/tm84cpZO6u 0HNQyfSE4qk64YwZoJKzwiKF8XvZRg/Bh+NM1ZPlnwcT6FKfHDS7aG4LvRhQFqwJ op5UXNgXsd3ETbExC23OWWf4alMb/RXYB2D4MwjlYtYI1HVlO1yJWw7rsKuo2Sdh BsI1IRA1a7Fgv7/riaGZX+cBITfgK5prPWlxFF+7k0qRfzFv6vUuGYyto81/vVk9 bX7UPtSpg9vn1/RNqA79QjE+RwlKWcVtFpQr3vvv4KDzlFS4ivbw9ttUS0KP6HQZ CZyJlFLQ =wflj -----END PGP SIGNATURE----- --nextPart2046993.x0N0T6uNKo--