Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jun 2020 09:58:25 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Ed Maste <emaste@freebsd.org>
Cc:        Kristof Provost <kp@freebsd.org>, freebsd-git@freebsd.org
Subject:   Re: svn primer translation to git
Message-ID:  <CANCZdfrL0-UGRQkbFfwBTCEaA6Q2SJmZhZUDWJow2qCQaWpwYA@mail.gmail.com>
In-Reply-To: <CAPyFy2CMzr-=rDYsbYsgVmetbQmA5nuKL6e4YL0gWrndq4GRrg@mail.gmail.com>
References:  <CAPyFy2Dy4cLQpgUsk_ushXsQFvRPk2S8SEfgWF=0xibGRGJvKw@mail.gmail.com> <20200625082455.9f1343f6f353f4be24385bc6@FreeBSD.org> <A5948BAC-C861-45A5-8AD4-F4A9D3A44EF3@FreeBSD.org> <CAPyFy2CMzr-=rDYsbYsgVmetbQmA5nuKL6e4YL0gWrndq4GRrg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 25, 2020 at 6:55 AM Ed Maste <emaste@freebsd.org> wrote:

> On Thu, 25 Jun 2020 at 03:09, Kristof Provost <kp@freebsd.org> wrote:
> >
> > The original commit already followed the =E2=80=98headline summary, exp=
anded
> body=E2=80=99 rule. This MFC would also work (often there=E2=80=99s no bl=
ank line between
> the =E2=80=98MFC=E2=80=99 and the next line), but I do wonder if MFC r362=
183: netmap:
> vtnet: fix races in vtnet_netmap_reg() wouldn=E2=80=99t be better.
>
> I agree we need to choose and document an approach.
>
> There are examples of your proposed style already. I would suggest we
> go one step further though; the source revision is really metadata,
> and ought to be tracked by the tools in an automated or semi-automated
> way. The git equivalent for MFCs is `git cherry-pick`, and it has a -x
> flag to append the original commit hash.
>
> Let's say I wanted to MFC r362543 (91285bbdc146 in the current GitHub
> mirror):
>
> ```
> commit 91285bbdc146fee00b83b8605e11aec19ed18b2a
> Author: emaste <emaste@FreeBSD.org>
> Date:   Tue Jun 23 15:36:05 2020 +0000
>
>     ldconfig: remove i386 aout invocation
>
>     aout support in ldconfig hasn't been required since FreeBSD 2.x.
>
>     Anyone still using FreeBSD 2 shared libraries can use a FreeBSD 2
>     ldconfig to generate aout ldconfig hints.
>
>     Reviewed by:    dim, kib
>     Sponsored by:   The FreeBSD Foundation
>     Differential Revision:  https://reviews.freebsd.org/D24883
>
> Notes:
>     svn path=3D/head/; revision=3D362543
> ```
>
> To MFC this to a stable/12 worktree I could use
> ```
> % git cherry-pick -x 91285bbdc146
> ```
>
> When I go to commit the default commit message is:
> ```
> ldconfig: remove i386 aout invocation
>
> aout support in ldconfig hasn't been required since FreeBSD 2.x.
>
> Anyone still using FreeBSD 2 shared libraries can use a FreeBSD 2
> ldconfig to generate aout ldconfig hints.
>
> Reviewed by:    dim, kib
> Sponsored by:   The FreeBSD Foundation
> Differential Revision:  https://reviews.freebsd.org/D24883
>
> (cherry picked from commit 91285bbdc146fee00b83b8605e11aec19ed18b2a)
>
> # Conflicts:
> #       libexec/rc/rc.d/ldconfig
> ```
>
> I think this is fine, and consistency will facilitate tooling for
> automating to answer questions like "what commits of mine have not
> been merged to stable/12 yet?" (If I wrote git I'd choose a different
> format for the message, but consistency is more important than
> aesthetics here).
>

At work we have and slightly enforce something more like the following:
... (same as Ed's stuff)
Reviewed by:    dim, kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D24883
Cherry Pick: 91285bbdc146fee00b83b8605e11aec19ed18b2a

which would follow our style better, though would require a git tool tweak.
This way our commit hooks could enforce it, allowing some flagging of
direct commits

Direct Commit: yes.
or
Cherry Pick: n/a

Though I don't like the words 'cherry pick' it's the current terminology,
isn't git specific and matches the git tooling.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrL0-UGRQkbFfwBTCEaA6Q2SJmZhZUDWJow2qCQaWpwYA>