From owner-freebsd-git@freebsd.org Wed Dec 23 14:29:16 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 E76424C06F9 for ; Wed, 23 Dec 2020 14:29:16 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (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 4D1Fvc5wl4z3C4l for ; Wed, 23 Dec 2020 14:29:16 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qv1-xf33.google.com with SMTP id h16so7628178qvu.8 for ; Wed, 23 Dec 2020 06:29:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Xsi13L+83/DQec89hbk426zGAwUC5swYmOS5CEYfTjM=; b=RVa54ERceIrZz+dlJZHecW6FE50hDuqR3k5d5BFSMhKYtFPF4YcE05DlIPlhOve3Ft AnMa/bBVHgaI4hXkE290YZS1HypsnsKXJLxS8ADbeitsx5Ut0+buutnrU9emoQsmMAyq SVaERtPRldm+JaItO2pNjzCP/USbNyl1+YtCz5nyqdAM5yxg2IXlUhxVDiu/z78wpBqO HKerQr8x/wy69yepBQLHQc5BnIXDQuva65keIp0ilJ4zmUEH0SiqNSxhX4MVzr3h9lDy Z6FDXR+plX2XgYAlze8BAWiYmZNizAXN8Sg8wfrkE+pK83rd6rSvoY758JxfNJcrhDvL iNKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Xsi13L+83/DQec89hbk426zGAwUC5swYmOS5CEYfTjM=; b=QwWJ55ixOH/tpLbwvF0FcsDsHaI7NncJkMFHrDjuev3OlBYC059kl7uJ6MN2/nlKAV iXrVBYzBefRj40PQGxDhWsCg+/nLyJ/hV6U9Czw8Nj0Wjgh3YKOEdXaNjLJBtSlaLW6A D/1eVcI1t0oZArReaDYHwf1bWTSs4GMN0IZqkfF5bi6YzyP3oMDWKIA2b2Z6bKAJPScB N2iHkmiuPoUzfVQ4+PU8D3QYHuefwdVWA3lW9hilFYE4peJhuPrvRtLyxUbWIbqv7xnQ CLTAZXLZTHTb+m1XrfTK+jpnWhSJKVkY4SCYHV5lJbZD2vMDGlBt5EW7d48CkiQixVPi w1hw== X-Gm-Message-State: AOAM531X/RWcqzQ555uGgoRpi/hFj6MlgiRAyKhbw5S7iVIEQx9rzU/y lvhWM9772eok8bayBH1bPJl1W5jC4r+AOA== X-Google-Smtp-Source: ABdhPJwlj8PJGU5w6yu5xYEmR9ZNUpXaJm+c2MQrr/0BqPVCcO1pi4JmxdpmYaVI6leTReHiwUjfYg== X-Received: by 2002:a05:6214:14ae:: with SMTP id bo14mr26915608qvb.16.1608733754448; Wed, 23 Dec 2020 06:29:14 -0800 (PST) Received: from mbp.home (200-12-5-188.rev.tribenet.com.br. [200.12.5.188]) by smtp.gmail.com with ESMTPSA id q185sm4447544qka.96.2020.12.23.06.29.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Dec 2020 06:29:13 -0800 (PST) Sender: Renato Botelho Subject: Re: Migrating a merge based project to new tree To: Shawn Webb Cc: freebsd-git@freebsd.org References: <20201223141517.xk66q3fboch6fwhj@mutt-hbsd> From: Renato Botelho Message-ID: Date: Wed, 23 Dec 2020 11:29:10 -0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20201223141517.xk66q3fboch6fwhj@mutt-hbsd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4D1Fvc5wl4z3C4l X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] 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, 23 Dec 2020 14:29:17 -0000 On 23/12/20 11:15, Shawn Webb wrote: > On Wed, Dec 23, 2020 at 09:35:11AM -0300, Renato Botelho wrote: >> I'm working to migrate a downstream stable/12 based tree to the new git >> repository following instructions from [1]. >> >> I did a final merge from legacy repository and made sure top commits on both >> branches point to the same tree: >> >> # git show -s --format=%T f4d0bc6aa6b9 >> 98db7229803a5c93e3132bc661201f204487eee9 >> # git show -s --format=%T f262e04c92d7 >> 98db7229803a5c93e3132bc661201f204487eee9 >> >> When I try to merge new one git refuses to merge due to unrelated histories. >> Should I use --allow-unrelated-histories parameter? >> >> [1] https://github.com/freebsd/git_conv/wiki/Migrating-merge-based-project-from-legacy-git-tree > > HardenedBSD's in the same boat. We're toying around with different > methods of fixing our repo right now. When I used > --allow-unrelated-histories, git noted merge conflicts on every single > file HardenedBSD has touched over the last 7.5 years. I tacked on "-X > ours" and that made git happy. However, I'm unsure git always did the > right thing. I'm working to verify that this week along with trying > the other documented methods. I've managed to do it adding `-s ours` to change merge strategy and preserve our changes. git merge legacy/stable/12 git push origin devel-12 git merge --allow-unrelated-histories -s ours freebsd/stable/12 After that I can confirm there are no differences: # git status On branch devel-12 Your branch is ahead of 'origin/devel-12' by 243035 commits. (use "git push" to publish your local commits) # git diff origin/devel-12 # -- Renato Botelho