From owner-freebsd-git@freebsd.org Sat Nov 28 21:49:57 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 7683C46BA68 for ; Sat, 28 Nov 2020 21:49:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (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 4Ck4sc5gklz4nnb for ; Sat, 28 Nov 2020 21:49:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x733.google.com with SMTP id u4so7508199qkk.10 for ; Sat, 28 Nov 2020 13:49:56 -0800 (PST) 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=kXVhlBcVzaFd+1G78PsPS/C+dsAVJVf/uSFKyU0vYhc=; b=V7UHHFVeoET5QakI8IjTwysBkPnAVReHUua1ffltsGe/SKwRS2oygmJ1120dfdrg67 Mu01Uy038lUQywfFvr8yPRuK54QvgsQW7Ux4fCG1dqsO1RoChFTttPGZ8Ou5tDI2ogyq /6cTi10CzmJogwYJ4hw01/zxWzmORpuKu0KsphSWTMRugzswwwdCUW23rChk7Zr+qrh6 pyBKD440c4kvS0cQNzNnvjbO9gTaS4Nnny1/qEZ7qtoB0fkotIhdTLL6YQLF9fpihq5+ X94cyUbvM7WPP836YXpxzE/36hIFG8MFVmGKWO2bcqcjTPyRDwC0Tg3kEIsysxK+a769 l4zA== 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=kXVhlBcVzaFd+1G78PsPS/C+dsAVJVf/uSFKyU0vYhc=; b=E6su9fCDpGhnz/69rtsm1o7qg5Am3NZbA1C/s3YGzU8+IPaJeAhOUCD4yFTK8Mb90E YDYyKCwHwGISO3c8CzBPs20OzbnebQOJ6s7Awo5Scey4+hKEscApOpe/fGCnASYDK968 c+/1FX16yXZaw7/+VQrsPz2TyXH9ml+0Xr6Red+XLBMCKLQZokFcEuwLQOUNR5hqcuf8 3T3eYUJsq/FTJGZYRYOoeaTay2+PFH069Y6Ln0U9V5Z/0SJFtzhFaiQSgZs/RfHN7ngS HQwOwowAHfwKjW6XFkgpcrmi9ZTAutldsUI1LNoGIPQ6VbhI8p+Z7GrfX3e96fAdqOwK Y4ZQ== X-Gm-Message-State: AOAM530w/2VH8p3PFtPbCej9rdcv5VjaRpzXCqYe1HcXAA5rgZAxS0HW mLiHDkwVTPUp5kNww/CvfcbKAp/UaKa0+rtMU4l6cg== X-Google-Smtp-Source: ABdhPJzAuvH2l4YBo6/b2tRmelOVkjYcJlTfsi4uWQlZP4oRq+aAjeEs82yVtCeFNVS14l9S7NmfyEKem4IdNQ81t8s= X-Received: by 2002:a05:620a:88e:: with SMTP id b14mr15716471qka.195.1606600195719; Sat, 28 Nov 2020 13:49:55 -0800 (PST) MIME-Version: 1.0 References: <20201128165115.GA22587@freefall.freebsd.org> <20201128205528.GA58416@freefall.freebsd.org> In-Reply-To: <20201128205528.GA58416@freefall.freebsd.org> From: Warner Losh Date: Sat, 28 Nov 2020 14:49:44 -0700 Message-ID: Subject: Re: HEADS UP: freebsd-ports hashes were all changed To: Rene Ladan Cc: =?UTF-8?Q?Ulrich_Sp=C3=B6rlein?= , freebsd-git@freebsd.org X-Rspamd-Queue-Id: 4Ck4sc5gklz4nnb X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=V7UHHFVe; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::733) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 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(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-git@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::733:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::733: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:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::733:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[freebsd-git]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 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: Sat, 28 Nov 2020 21:49:57 -0000 On Sat, Nov 28, 2020 at 1:55 PM Rene Ladan wrote: > On Sat, Nov 28, 2020 at 01:41:02PM -0700, Warner Losh wrote: > > On Sat, Nov 28, 2020 at 9:51 AM Rene Ladan wrote: > > > > > On Sat, Nov 28, 2020 at 12:52:01PM +0100, Ulrich Sp=C3=B6rlein wrote: > > > > On Sat, 2020-11-28 at 12:24:41 +0100, Ulrich Sp=C3=B6rlein wrote: > > > > >Hi folks, bad news > > > > > > > > > >While carving out the history of the access and mentors file (we > want to > > > > >retain that for historical analysis, which people seem to do from > time > > > > >to time), I overlooked that fact that the previous runs for ports > did > > > > >contain all of CVSROOT, but the new one, by necessity would not > contain > > > > >CVSROOT/{access,mentors}, in fact, I dropped the whole CVSROOT > prefix > > > > >from the latest rules file. It should never have been there in the > first > > > > >place. :( > > > > > > > > > >All that is to say that this of course means all the git commit > hashes > > > > >for the ports tree have changed. Oops. > > > > > > > > > >Sorry about that, please let me know if you need help in > transplanting > > > > >your work from old hashes to new hashes. > > > > > > > The web finds [1] which would translate to > > > > > > git merge orgin main --allow-unrelated-histories > > > > > > but I'm not sure if this is the correct hammer? > > > > > > [1] > > > > https://github.com/git/git/blob/master/Documentation/RelNotes/2.9.0.txt#L= 58-L68 > > > > > > > I'm not sure either. What does your tree look like? Is it just tracking > > upstream? Or do you have changes / branches? > > > I have a few local branches for some WIP things that I keep in sync with > main. > None of those are pushed obviously. If all else fails I can just reclone > the > repository and recreate those branches, they are of a temporary nature. > OK. So, at this point, 'main' locally is the old hash, and 'origin/main' is the new hash. I'd recommend the following. What it does is creates an 'oldmain' branch to match the current repo, then recreates the new hash main as 'main' and then rebases all your WIP branches to main with the new hashes. It looks a bit scary, I'll grant, but I've done similar things a lot. If any is unfamiliar, then reading the man page first is a good idea. If things go wrong, then 'git reflog' will help you recover the values for old branches, etc. git rebase --abort is your friend if it's going horribly sideways... (1) Create a new name for the old main: % git checkout main % git checkout -b oldmain (2) Now, make main point to the new hashes % git checkout -B main origin/main (3) now, for each of your WIP branches, rebase them (I have -i here, but that's finger memory). % git rebase -i oldmain $WIPNAME --onto main (4) if you really want, you can now delete oldmain, though I'd keep it around for a while. % git branch -D oldmain Make sense? Oh, if it does go terribly sideways, and you need to just reclone into a new directory, you can check out http://bsdimp.blogspot.com/2020/08/how-to-transport-branch-from-one-git.htm= l which will show you how to use git format-patch and git am to move the branches to the new repo. Again, git reflog can help if branch names get screwed up since that's as close as git gets to keeping meta-data history..= . And please let me know if it works, or if you encounter any issues. Warner