From owner-freebsd-git@freebsd.org Wed Dec 16 21:31:53 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 0EF6D4C6DEE for ; Wed, 16 Dec 2020 21:31:53 +0000 (UTC) (envelope-from uqs@freebsd.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a05:fc87:1:5::15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.spoerlein.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cx7cS4QxKz4R1T for ; Wed, 16 Dec 2020 21:31:52 +0000 (UTC) (envelope-from uqs@freebsd.org) Received: from localhost (acme.spoerlein.net [IPv6:2a05:fc87:1:5:0:0:0:15]) by acme.spoerlein.net (8.16.1/8.15.2) with ESMTPS id 0BGLVjsH047553 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 16 Dec 2020 22:31:45 +0100 (CET) (envelope-from uqs@freebsd.org) Date: Wed, 16 Dec 2020 22:31:45 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Warner Losh Cc: Cy Schubert , freebsd-git@freebsd.org Subject: Re: Vendor Imports Message-ID: References: <202012160812.0BG8C7iT006176@slippy.cwsent.com> <202012161609.0BGG910P018294@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.1 (2020-11-14) X-Rspamd-Queue-Id: 4Cx7cS4QxKz4R1T X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:39540, ipnet:2a05:fc87::/32, country:CH]; local_wl_from(0.00)[freebsd.org] X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.34 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, 16 Dec 2020 21:31:53 -0000 On Wed, 2020-12-16 at 12:49:02 -0700, Warner Losh wrote: >On Wed, Dec 16, 2020 at 9:09 AM Cy Schubert >wrote: > >> In message >> > om> >> , Warner Losh writes: >> > --0000000000002f35bf05b6945830 >> > Content-Type: text/plain; charset="UTF-8" >> > >> > On Wed, Dec 16, 2020 at 1:12 AM Cy Schubert >> > wrote: >> > >> > > Can we extrapolate that multilevel vendor trees, those with >> > > subdirectories, >> > > would need a cp -R or rsync? >> > > >> > >> > It would. >> > >> > >> > > The example shown says: >> > > >> > > % cd ../mtree >> > > % cp ~/git/NetBSD/usr.sbin/mtree/* . >> > > % >> > > >> > > cp -R would be appropriate for more complex software like openssl, >> > > unbound, >> > > and the like. Is this correct? >> > > >> > >> > Yes. You're right. rsync with delete has been suggested, but I've not had >> > time to update the example. >> >> Except that rsync duplicates hard link relationships whereas cp -R copies >> them as if they are independent files in their own right. An rsync without >> the -a or -H options should be suggested. Or does git treat hard links to >> the same file as different files? (Meaning I'm talking through my hat?) >> > >I'm unsure. An experiment is in order. Git only knows soft links, hard links are handled implicitly, as they have the same content hash, so the blob is the same and you end up with 2 tree entries pointing to the same blob. (To my knowledge a checkout will *not* hard link files, think about supporting Windows and all that, even though NTFS supposedly has links too?) To handle deletes, you either need to: - rm -rf * && cp -R ~/some/src/ . - rsync -a --del ~/some/src/ . or anything in between. Just make sure that file deletions are also being done :) Cheers Uli