From owner-freebsd-git@freebsd.org Wed Jan 22 14:33:40 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 2A1131F1ECC for ; Wed, 22 Jan 2020 14:33:40 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f195.google.com (mail-il1-f195.google.com [209.85.166.195]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 482nvl1FVZz46K7 for ; Wed, 22 Jan 2020 14:33:35 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f195.google.com with SMTP id b15so5317354iln.3 for ; Wed, 22 Jan 2020 06:33:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=TIbYC31M9IDLNWpMzjW4XFHys+zpyQGEnGlLIn2dnUE=; b=W7J7qdU0UtAbZJYGZQkauGUUd1f4qo0+sxbA5ouHads7PU7Liktxftv50wSes/Mcic +K2n5oUI14rar7olKGX1mXz7vK8RSqWnGfDopuen7lMrCRWFdfOGfsuzwSD5T1MkHpyS K6aaBrQyNa5WyeX6+T3G3VqXpbsU6idTZWkajkV6I13kBh7Rmx/71Ynl/PKHYSU66gkp TwyVhSC6JL0NF3ti8puM1xMlqIOtFbMaRE892+ZnQwRpQQ2oimxApNiMbJJt3qrSfH1G NGg/P8OCE6HYW80IXzaxiEtKCC/e6uVaR8xF7R/wnPk4YTDdcW1efGlawGdkDSc4xwPA 91/g== X-Gm-Message-State: APjAAAVNPeL+rlTczYfqBzfpWEjAOgTK3aE/yCzCRiF6/GAraL315cZ4 uLqxuM1TSJffRWMLY9KJxv10Gl9vp05/ac9PjiONU/tZ X-Google-Smtp-Source: APXvYqyW0eAr8eBuqccrBzprma32RJsNqowBU7fLDfNIwauYqmV7ylel7XxUv5JMY7Nxk7bnJjfY0cO/62uMrAVFcTE= X-Received: by 2002:a92:5cda:: with SMTP id d87mr8666016ilg.100.1579703614271; Wed, 22 Jan 2020 06:33:34 -0800 (PST) MIME-Version: 1.0 From: Ed Maste Date: Wed, 22 Jan 2020 09:33:21 -0500 Message-ID: Subject: Experiments using git subtree to manage FreeBSD contrib/ To: freebsd-git@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 482nvl1FVZz46K7 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.195 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-3.07 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-git@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_NONE(0.00)[195.166.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.07)[ip: (-0.43), ipnet: 209.85.128.0/17(-3.07), asn: 15169(-1.82), country: US(-0.05)]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; DMARC_NA(0.00)[freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[195.166.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; RCVD_TLS_ALL(0.00)[]; TO_DOM_EQ_FROM_DOM(0.00)[] X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.29 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: Wed, 22 Jan 2020 14:33:40 -0000 I have been experimenting with git-subtree to manage contrib/ code, as a git workflow analogue to our current Subversion vendor branch approach. As described previously on this list[1] and on the git mailing list [2] there were some oddities in our current svn->git converted repo. They tripped up "git subtree split" and made the split-out repo unusable. Recent proposed git patches have addressed those issues and alllow us to make progress with experiments. (We're not yet ready to commit to and document the subtree workflow though.) Tom Clarkson posted a patch set[3] that allows command-line control of the subtree split process and avoid the undesired part of the commit graph. I tried the changes, and the patched subtree split works as we'd like. I split elftoolchain using these commands: % git subtee ignore --clear-cache --prefix=contrib/elftoolchain 4d43158 % git subtee use --prefix=contrib/elftoolchain 9ee78763 % git subtee split --prefix=contrib/elftoolchain upstream/master This took about 15 minutes to run - more than manageable for what will be a one-time operation. The result is available in a branch in my github elftoolchain fork[4]. There are still a few undesired commits (e.g., [5], [6]) to be cleaned up, and a final conversion would be done with additional --ignores to eliminate them. That said, they don't impede progress while we're prototyping. The split-out contrib/elftooclhain subtree is a reasonably faithful representation over 247 commits of the changes made in svn. Next steps with subtree experiments include converting additional contrib/ directories, and prototyping updates from upstream (with some that use git, and some that do not). I'm interested in finding other contrib/ code maintainers who are willing to test out the conversion - please send me a note if so. [1] https://lists.freebsd.org/pipermail/freebsd-git/2019-November/000218.html [2] https://lore.kernel.org/git/CAPyFy2AsmaxU-BDf_teZJE5hiaVpTSZc8fftnuXPb_4-j7j5Fw@mail.gmail.com/ [3] https://github.com/gitgitgadget/git/pull/493 [4] https://github.com/emaste/elftoolchain/tree/tom-clarkson-conversion [5] https://github.com/emaste/elftoolchain/commit/4c7c3a9c7250934d80336acee52b28216b0e6837 [6] https://github.com/emaste/elftoolchain/commit/a18e967ee8dcb8983de5bfb4e5d6396076abde27