From owner-freebsd-git@freebsd.org Wed Jun 17 02:25:17 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 E5D8B33F6A0 for ; Wed, 17 Jun 2020 02:25:17 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) (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 49mpnT17Hgz47rQ for ; Wed, 17 Jun 2020 02:25:16 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f66.google.com with SMTP id p20so945849iop.11 for ; Tue, 16 Jun 2020 19:25:16 -0700 (PDT) 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; bh=iRGzAKmlxKtGhUVvE1yng8QP4Ee3DViRSNkFvsYnmxM=; b=RbvFu6VBYVuQMLMgPLQ3dbteepLYymECulWBjorOPg2x5RmhJc5ihm5kL2u6AN5ZWi tM+fMVvdAw+WbrsPS7Au9Cq9k6rjhJqxCcI3z4kIjaOOmvRsTZ36mkmP/mHE/xRXJQIc 0HpO5eeopS20IVhhulM3B/P2Dl9e9j366t6+QBadK8oJGKwGszPs6o5RQGH7mBdnDpRv OdPlnwlaHDObbQrQ26CTLftOJ8SEEB9r845EbW0nN1oBa8RJ61D2RVCK63uedaj6or4c wG9jbzawkbWBKEiP6dkzjC6/JZ8H5orOy2XV2JwfwfNF6B2A0VndCy+LGq0VxbbtyZxV tHng== X-Gm-Message-State: AOAM533hd+wCaP58FlmsNtH6vpxP8rr/9V/ZpcxEJFBf0n5C2HHogIz1 2scIWNgNgWADath9YBlZuhV1O/f8Zg61+SU1vkanMLGT X-Google-Smtp-Source: ABdhPJyDZiTRp9sOlneqhzYHYdvAhak9Kd205V8BArqzmjVpNp46lszd2ki+i/3gQO/2JG7Q80fjAHdwdsQ+X+RsDqk= X-Received: by 2002:a02:960a:: with SMTP id c10mr28173076jai.12.1592360714780; Tue, 16 Jun 2020 19:25:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ed Maste Date: Tue, 16 Jun 2020 22:25:02 -0400 Message-ID: Subject: Re: Next odd commit affecting `git subtree split` experiments with contrib/elftoolchain To: freebsd-git@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49mpnT17Hgz47rQ 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.66 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-0.29 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; 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(-0.63)[-0.634]; DMARC_NA(0.00)[freebsd.org]; NEURAL_SPAM_SHORT(0.62)[0.617]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.66:from]; NEURAL_HAM_MEDIUM(-0.27)[-0.271]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.66:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; TO_DOM_EQ_FROM_DOM(0.00)[] 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: Wed, 17 Jun 2020 02:25:18 -0000 On Tue, 16 Jun 2020 at 14:41, Ed Maste wrote: > > I've found one new class of strange commit - r265044, which I've > excluded from mergeinfo parsing (in the above list). However, svnweb > highlights an issue: I've now successfully used Tom Clarkson's patched git subtree[1] to split elftoolchain out of cgit-beta, keeping the vendor branch history intact, and avoiding the extraneous and bogus commits. I used https://cgit-beta.freebsd.org/src.git at 4c09cab462f2d27794d51a4dcb06df806dc9f3a6, and performed the following steps: % git log contrib/elftoolchain 1. Observe that the initial commit under that prefix is: commit f4b5186d24f3e1969c32a49f126c8ad29ece63e9 Merge: 8b06418614b0 5265ace0e440 Author: Kai Wang Date: Wed Jan 15 22:30:48 2014 +0000 Copy libelf, libdwarf and common files from vendor/ to contrib/. 2. Inspect the two merge parents and determine that the second (5265ace0e440) is the initial elftoolchain import: it 5265ace0e440a23fb522c516f4ee20f43eaed2b3 (origin/vendor/elftoolchain/elftoolchain-r2974) Author: Kai Wang Date: Wed Jan 15 08:43:20 2014 +0000 Initial import of elftoolchain r2974. Obtained from: elftoolchain.org 3. Split the subtree, using patched git: ~/src/git/contrib/subtree/git-subtree.sh split \ --prefix=contrib/elftoolchain \ --onto=5265ace0e440a23fb522c516f4ee20f43eaed2b3 The "onto" revision is the initial hash in the subtree. With the patched git subtree this is needed, because we don't have metadata about the subtree (as would be created if `git subtree add` was used to initially create the subtree). After some time the hash of the split tree is printed: 5f7e5a9dbe67c06fb6baf08f26745e537fcfe9dd At this point I can do what I like with the subtree. I could create a branch for it, or push it to a GitHub repo: % git push github-elftoolchain \ 5f7e5a9dbe67c06fb6baf08f26745e537fcfe9dd:refs/heads/split-from-cgit-beta Which is now available here: https://github.com/emaste/elftoolchain/tree/split-from-cgit-beta