Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Dec 2020 23:25:04 +0100
From:      Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
To:        Jonathan Chen <jonc@chen.org.nz>, freebsd-stable@freebsd.org
Subject:   Re: git, $FreeBSD$ and mergemaster
Message-ID:  <f341a819-5bf3-806d-4103-591d0320cf22@plan-b.pwste.edu.pl>
In-Reply-To: <CAJuc1zNmSJ_qcJSSEFnihE4aLNvjZKUVgFA8GKrymmJ38qSfDw@mail.gmail.com>
References:  <CAJuc1zNmSJ_qcJSSEFnihE4aLNvjZKUVgFA8GKrymmJ38qSfDw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--Fjuoga0bq8ZivvLKKYY0BbeIvUgANxtjW
Content-Type: multipart/mixed; boundary="cO3dTVbfUcY0cKJQI8kCS5aW6lmfwgaTt";
 protected-headers="v1"
From: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
To: Jonathan Chen <jonc@chen.org.nz>, freebsd-stable@freebsd.org
Message-ID: <f341a819-5bf3-806d-4103-591d0320cf22@plan-b.pwste.edu.pl>
Subject: Re: git, $FreeBSD$ and mergemaster
References: <CAJuc1zNmSJ_qcJSSEFnihE4aLNvjZKUVgFA8GKrymmJ38qSfDw@mail.gmail.com>
In-Reply-To: <CAJuc1zNmSJ_qcJSSEFnihE4aLNvjZKUVgFA8GKrymmJ38qSfDw@mail.gmail.com>

--cO3dTVbfUcY0cKJQI8kCS5aW6lmfwgaTt
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

W dniu 24.12.2020 o=C2=A003:01, Jonathan Chen pisze:
> Hi,
>=20
> With the transition to git, I'm now getting a lot of prompts for
> differences against an empty $FreeBSD$, eg:
>=20
>   *** Displaying differences between installed version and ./.cshrc:
>=20
> --- /.cshrc     2020-09-03 19:14:19.258107000 +1200
> +++ ./.cshrc    2020-12-24 14:52:16.751245000 +1300
> @@ -1,4 +1,4 @@
> -# $FreeBSD: stable/12/bin/csh/dot.cshrc 363525 2020-07-25 11:57:39Z ps=
tef $
> +# $FreeBSD$
>  #
>  # .cshrc - csh resource script, read at beginning of execution by each=
 shell
>  #
>=20
> While I can simply run a "mergemaster -F" to get past this particular
> update, how will mergemaster operate in the future when there are
> changes in /etc if it can't inspect the $FreeBSD$ tag anymore?
>=20
> Cheers.
>=20

We can still make use of these $FreeBSD$ tags with Git clean and smudge
filters.[1] This will help to keep the track of files updated by
mergemaster(8) or etcupdate(8). The whole work can be done at
user/administrator level. No need to bother committers, core@, re@ etc.

Apparently, neither mergemaster nor etcupdate really needs these
$FreeBSD$ tags, but we still _have_ them[2]. The ongoing discussion
about removing them makes me really anxious, why not use them to make
something profitable at the user level.

I have done some tests with clean/smudge on stable/12 and head branches
and I find these tags really useful after the transition to Git. With a
bit modified scripts from Git documentation examples[1] it is possible
to regenerate these tags for example in the following form:
# $FreeBSD: 7d69f46f647 gbe@FreeBSD.org Sat Dec 19 09:55:02 2020 +0000$

When the build system utilizes the same local Git repository configured
for builds, then the tags will be updated only with new commits
regarding tagged files. However, the info provided in them can be
misleading, especially after recreation of local repository and initial
checkout or after running "git gc" in the repo. Anyway, it _can_ really
help the administrator to keep track of files updated by mergemaster or
etcupdate.


[1] https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes
[2]
https://lists.freebsd.org/pipermail/dev-commits-src-all/2020-December/000=
369.html

Regards,
--=20
Marek Zarychta


--cO3dTVbfUcY0cKJQI8kCS5aW6lmfwgaTt--

--Fjuoga0bq8ZivvLKKYY0BbeIvUgANxtjW
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEEMOqvKm6wKvS1/ZeCdZ/s//1SjSwFAl/s/kAFAwAAAAAACgkQdZ/s//1SjSz1
OQf/YP0J0mvEFaW7AN31dCb4r0j5li/LqvnsTKNtufRS26bpSj2NbH2IwJkvOEIVq+OXPxmdMUlD
RipHLOJWH692fnLAM9xCzzBaase1Mq2YVYoL1psF0f6lOBzDUtqZXzLQru11gJ9bNB79uIJeYy8+
52S5Sadq+o5wWaC90SMydH3FIgfMeEYd/i4WjKv2FKBL+u7EBsVslp/vgAouiIOln2vs6EeTGY0a
UXdCUU9OsxiPw1Oeuka8/Ab1YtqdFiM953sPI5KBNohIdC54/dYZGT+Xp3YqRnM3CmvBWwFZ+aDX
XDrSMYu02AP3OH6qtKBftmBAiSzqHj/OQRCBWtos6w==
=ve11
-----END PGP SIGNATURE-----

--Fjuoga0bq8ZivvLKKYY0BbeIvUgANxtjW--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f341a819-5bf3-806d-4103-591d0320cf22>