From owner-freebsd-git@freebsd.org Sat Nov 28 23:44:08 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 BE36946E794 for ; Sat, 28 Nov 2020 23:44:08 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) (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 4Ck7PN4Y2Gz4tsB; Sat, 28 Nov 2020 23:44:08 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: by mail-oi1-x233.google.com with SMTP id j15so10114422oih.4; Sat, 28 Nov 2020 15:44:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=aQzish9XsOx5WaAQ0VwpbGeYutkC7Ng2m/SfbqLoSIE=; b=SwnSeI9vM5HlAZRAZ2fRbCUpQXe19Js23mEtxQLL6YYUE7/GofucGhWhVose48nfDp OE6G6/a+ZFz+Q6wMFmhTXKCn+XazkhwMfPU3zH5fbbiAuYoWVgJrqLorNiNIpzRxRbCs 1NQSZGJA5/n7DQ9INAKKeHI/wNh3rRJCrUseiz5BOImVInv6+ALZdcN1bnhG/9AxWd6w t1vAKdBAp57hU2/dqJD+wv/8/bO96LV9aIxt51RLoWS+mkC6fL81z6bAJTS859B6yxC7 W115ab3hgsN2I2apfT0jUwD1v/4DQTNR/6+BTkcAbVz62abxtT71dOSdlyjYxSSWPfTj 5JXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=aQzish9XsOx5WaAQ0VwpbGeYutkC7Ng2m/SfbqLoSIE=; b=F5117Lhyzz5wskbHH7iXHO1jhPsyNjBcajvZsxi1H76V+VecSNXgXTry+//ejmUBJ1 K2haH+qYYriGhl8f0hEG5Bd3rHCtY2LQw2GXGGmlg1QQfd+AHs2hJPgEY3Hl9bwUBiHm Y+Hgdt8bavXjHCnJY6ksQ+QnroZ7bKrrEgAwgA24AyTq/a3Ta5ok6DrrKp/n1gzHKTXX 8PftnvTzq2rxT6oDkrvwGGTrN2/MMiloEJ4HNcGWeZGkt2EzCcYlbJG53SMFgcMzdVdE Q9WxVi0Jw/YtYE6qcTxadCWl73GVaAhrTqFXLE03BJYYw2gEXU2U6Ne3iKPSbCUpgesR YDWg== X-Gm-Message-State: AOAM530bsFCcDVNeZXMs29ZNutY8GOVujNcYUIxc4xIWZXKX8+Srtab3 zvtF1UwgE4SHpuWx6v7ZeBf4w+x/yZxqizaaKAV1bVzp X-Google-Smtp-Source: ABdhPJxd9DUWOM6qAIizWgb1k3pM2mbpIyVKgPyE7h7iNlUI4gAZq4XTy4Yub8g6fnHcLwcsGKqwFzJILSLaXscWaIk= X-Received: by 2002:aca:a951:: with SMTP id s78mr10520339oie.114.1606607047484; Sat, 28 Nov 2020 15:44:07 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a4a:970e:0:0:0:0:0 with HTTP; Sat, 28 Nov 2020 15:44:06 -0800 (PST) In-Reply-To: References: <20201128165115.GA22587@freefall.freebsd.org> <20201128205528.GA58416@freefall.freebsd.org> From: Oliver Pinter Date: Sun, 29 Nov 2020 00:44:06 +0100 Message-ID: Subject: Re: HEADS UP: freebsd-ports hashes were all changed To: Warner Losh Cc: Rene Ladan , "freebsd-git@freebsd.org" X-Rspamd-Queue-Id: 4Ck7PN4Y2Gz4tsB X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] 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 23:44:08 -0000 On Saturday, November 28, 2020, Warner Losh wrote: > 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 wrot= e: > > > > > 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 fro= m > > time > > > > > >to time), I overlooked that fact that the previous runs for port= s > > 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 t= he > > 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#L58-L68 > > > > > > > > > > I'm not sure either. What does your tree look like? Is it just tracki= ng > > > upstream? Or do you have changes / branches? > > > > > I have a few local branches for some WIP things that I keep in sync wit= h > > main. > > None of those are pushed obviously. If all else fails I can just reclon= e > > 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 th= en > 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 branche= s, Another trick will be to create tags for the branches. Tags are cheap in git, reflog have a limited history by default AFAIK. > 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.html > 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 > _______________________________________________ > freebsd-git@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-git > To unsubscribe, send any mail to "freebsd-git-unsubscribe@freebsd.org" >