From owner-freebsd-git@freebsd.org Tue Feb 21 20:23:14 2017 Return-Path: Delivered-To: freebsd-git@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A31E8CE831D for ; Tue, 21 Feb 2017 20:23:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CDB7201; Tue, 21 Feb 2017 20:23:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x235.google.com with SMTP id k200so36074661itb.1; Tue, 21 Feb 2017 12:23:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=2cYbRkU6q1aVvqoaQkZjZuI/7xHjpU83A+outN4MNpg=; b=LUlfZ3emZcXI7Uy6VYqIrLNntBbBNkaejatQzFVxOG09Wfnp+vJ7n08xEOsGIIBZM3 DfgwXRn+N5aqo+I5tmJ3z9NioB9uFfB/wT4gI1wgS5jdiPcshhJL1/cqATVyVjUFjmCp EZS1+7OD5iWHXMTqPruhozhvMYWlTSoJh/BOsKRoIKQBZ4P5lpLJWSrMEr1xJYDymur9 NTvN0XtyeyaaXBnp4mgfPqRHpwjGgkJsUQ4A3XTEGjXUReCcpVuZG1rykt0b8A9lmSDf QDZ8HPSO7CjB2Esx769c6CDhxCGFbdkzslchYYqisr0xdVMg1EK7bqU+mcQIKSsNuAI7 0cwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=2cYbRkU6q1aVvqoaQkZjZuI/7xHjpU83A+outN4MNpg=; b=ib2hrvJSUfqrP/kD3GlUEvAGxtMeLf1Lk/OxQqn9mv+P15c9i8Od4GJJS3eZvy3IoP pF73of1WGrP8yJd7L7j5OvoLkzUnF/5kL6CMj/nMwfxPrYg5GbrG+nHytr4gRAbSpulH gaxGc9GRQWquYfdpRyMvykpzgmtR1G+K6ku7JZ2x2B9XzSB/cbCL2GTaHitelDXspFfn bauCZnr5n4jfyRUVWt1hU9T84X5IUzpA01YxWP2wj3pHKkMFSU7Jgykpl037JBoJdOB6 pfv5dqxIeu3xW9hoVknIAn+Sw8bxUa/JObtBzerxEgB64BoQfLZ5AVp0twWpGcSykhtG z82w== X-Gm-Message-State: AMke39l4dW6PaPuP2RYCT7cx8gFchRuu/zY46ntRN/XrycaHOWZeaL/WrcdLsVBqAYClnwD+584qmFH0NewsVw== X-Received: by 10.36.3.73 with SMTP id e70mr15192700ite.14.1487708593846; Tue, 21 Feb 2017 12:23:13 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.39.17 with HTTP; Tue, 21 Feb 2017 12:22:53 -0800 (PST) In-Reply-To: References: <49da18e4-b211-c48d-5486-368cda912fc0@multiplay.co.uk> <86mvdfy3qs.fsf@desk.des.no> From: Ed Maste Date: Tue, 21 Feb 2017 15:22:53 -0500 X-Google-Sender-Auth: MrYaMQp8FNPzkm8cCoyRVeRX3AY Message-ID: Subject: Re: Reconsider switching from svn to git? To: Warner Losh , freebsd-git@freebsd.org, =?UTF-8?Q?Ulrich_Sp=C3=B6rlein?= Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 21 Feb 2017 20:23:14 -0000 On a different (non-public) list we've been discussing git in FreeBSD, and I wanted to discuss one of Warner's points further. Before asking I asked for approval to quote the message here. On 21 February 2017 at 11:36, Warner Losh wrote: > > However, there's one big drawback we don't have with svn: it destroys > history. Rebasing branches destroys history, as does deleting > branches. In svn, you can always get that information back, but not so > with git. It's very easy to do these operations and quite difficult to > undo them. I'd like to understand this better. In my opinion, in general commit(s) should stand alone -- any metadata associated with the commit (PR numbers, review links, etc.) should be in the commit message itself. The fact that they were originally done on a branch should only be an "implementation detail." So I agree rebasing and committing loses that history, but think in general it should not matter. > If, and this is a big if, we go to using git, I'd like to *STRONGLY* > request that we not change the hashes we have on github today. There's > lots of people with branches from that and changing the hashes would > make them all useless. Well, not completely useless, but quite > difficult to recover from unless the branches were simple without > merges. This is a very tricky issue. I agree that there's a(n incredibly) large cost with changing existing hashes, and previously argued that it was an absolute nonstarter. Also, I think this is independent of switching to git as the source of truth: we have the same open issue with the current svn2git mirror. That said, I also strongly believe that, as long as SVN is the "source of truth" repo, the git conversion must be reproducible by third parties. I believe developers and others who consume FreeBSD via git must be able to validate that the data and metadata are consistent between svn and git. Unfortunately today even the subversion mirrors (svn.freebsd.org) have inconsistent metadata relative to repo.freebsd.org, so it's not currently possible for end users to validate the svn2git conversion. I've briefly discussed with uqs@ what it would entail to migrate to a "fixed" view of the history, and believe it's possible to facilitate a relatively painless migration. It could look roughly like: 1. Broadly announce the plan 2. Make a new alias for current master (e.g. master-legacy) 3. Start a new, reproducible conversion and push to a new master (master-ng) 4. As new commits are made to SVN update both master-ng and master-legacy 5. Provide guidance on migrating both rebase- and merge-based workflows to master-ng 6. Give notice of upcoming switch in what master points to 7. Switch master from master-legacy to master-ng 8. Stop updating master-legacy if/when it becomes infeasible to continue doing so, or when it's no longer used