From owner-freebsd-git@freebsd.org Thu Jun 25 15:58:38 2020 Return-Path: Delivered-To: freebsd-git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AA2035E7B1 for ; Thu, 25 Jun 2020 15:58:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49t4SF3kbHz4Fqv for ; Thu, 25 Jun 2020 15:58:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf2e.google.com with SMTP id cv17so2989435qvb.13 for ; Thu, 25 Jun 2020 08:58:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ENHHWFu10HypY9+EQlwfk80n+y7k21g/vLi5Ik0YFoA=; b=iZTIgvjW2OKjZnUJBgGUnF10CiSO0pIaZzYuHEcWszw/Zm07c+idT2BlywoQgZREhS CYBoto8r/euHNlY6RisDKhUS1Lug7CO1KIklFYEIg4S5tnLE5qWAu4IZiXCMFEaa63UR usQxfcQb4rDKdQmlmG2BS2wwFNEiEJQcqRynsiLDJA9oaapV6f+1SqNGrb6hby+5llj/ PtqdpyRHzp/wJc6bzEWLxuKzdXwfGs4G4zoEKLRS/vbQjEqcRoFsMJnSBYMPIHX6CnNh L4xJFFeLtDh2qnJfNjdazyNMwBAodklAFZNlHsvLb+cOTkqV1eK7CvFIuS6Dk66jIQzP Y4xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ENHHWFu10HypY9+EQlwfk80n+y7k21g/vLi5Ik0YFoA=; b=GtgkSGkl/zQSnQkUrcVLbFS09GAIC0/fzY+Pg/uH3FUun0tgx1jNfST2P4wDC8at5i mJrqpWrtKcY8LrCmTX/KolpfWcvp/WK7aINrD8JJEUPmUGIUOY81iPPLzS1tac6UlDP2 BgcZ8BYAsgwgETc7chEnNR1DHNTCq+EEvCF3wg0PjgYnC1+aLp9hDdPJVQoUEF2pn6YU N7rfzw1CL3mrQJKeedvJNZ5mXirl9HDtWYO7weky/2+9sxK600kyjdlw7GvD7cRkyi7E gc+0PTr23+9VIN9fOpPAQNKPXVNcDBaQ85baApBZQilk4hJ1gX/+wsvbJErYXNIMtq66 cRKg== X-Gm-Message-State: AOAM530qK+DmJ5tQEZ5oevyUNf3caweWh+VMbbbt9GlzEdn9IzHS5u5f D5iPcZkh2VQiRhRKUuGma1m698Ho3U8DVS8wrPAFiA== X-Google-Smtp-Source: ABdhPJy3qw307fI4FQwdqNpntMwTlgXWoQcwPOhzAnQrsAPbtGM4Xp4umt7/RjLakm527XGPkfY5PQn4DI9IytMcKm0= X-Received: by 2002:a05:6214:7a5:: with SMTP id v5mr25349988qvz.22.1593100716124; Thu, 25 Jun 2020 08:58:36 -0700 (PDT) MIME-Version: 1.0 References: <20200625082455.9f1343f6f353f4be24385bc6@FreeBSD.org> In-Reply-To: From: Warner Losh Date: Thu, 25 Jun 2020 09:58:25 -0600 Message-ID: Subject: Re: svn primer translation to git To: Ed Maste Cc: Kristof Provost , freebsd-git@freebsd.org X-Rspamd-Queue-Id: 49t4SF3kbHz4Fqv X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=iZTIgvjW; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f2e) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.03 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.84)[-0.841]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.94)[-0.940]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-git@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.25)[-0.254]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2e:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 15:58:38 -0000 On Thu, Jun 25, 2020 at 6:55 AM Ed Maste wrote: > On Thu, 25 Jun 2020 at 03:09, Kristof Provost 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 > 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