From owner-freebsd-git@freebsd.org Wed May 20 21:09:44 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 2B8572F5617 for ; Wed, 20 May 2020 21:09:44 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) (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 49S53q2VRCz3Yc2 for ; Wed, 20 May 2020 21:09:43 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f180.google.com with SMTP id n11so4824231ilj.4 for ; Wed, 20 May 2020 14:09:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=dAHb4tRGqYUN7QKYB+hUtApWlqsjvh5PPibe3sNnrsw=; b=qWo4YRpXysfBVjN0yJoGE5kIKzZyEft1b0891E+GBv0397aVXviobXiw5+uf05R9SC JY+DsDPhwOOhj1VPui+blAkMgPzP1Z3rhVZYslfpL5/1yoHdhYEQ8MRoG192AsfCeey3 Ta6Awj+0o4rp33fO1FqemyM6HQQSSVYvD89IhAhDYaBjMWJ+h/NHD3wVXStXATFGmnEl lwi4O74tx2o19LtYi/8kDz/7b83KWRPF/417rNYyoJ5hCoE6FZeTUd5pseMKO9ihfJ/w aS/xYnXCadZIO7EvDsJFj7qsSYHNuwlMH8h6hJdj0eiz5e13QNBD8SewpMLYx3iIvJ0c /wYg== X-Gm-Message-State: AOAM531ILz7Wgbjtqv3CnJ0o/pofahlQPG9ILxZjs99gtgn4/vxCWeTq VY8Ef/59acyTjeYFdIo8nLBLweo1b7J/V3Lw0DvWNRjKt2A= X-Google-Smtp-Source: ABdhPJzugXMKPHWpqmn0d+26U2SSa9NTOKMlx50PERhVc5Z30hQlyor2SCkQrEjb5onLnDEhJ2tlo+tyNUu8XEkJoOs= X-Received: by 2002:a92:4a0d:: with SMTP id m13mr5596000ilf.98.1590008981482; Wed, 20 May 2020 14:09:41 -0700 (PDT) MIME-Version: 1.0 From: Ed Maste Date: Wed, 20 May 2020 17:09:29 -0400 Message-ID: Subject: "git replace" experimentation To: freebsd-git@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49S53q2VRCz3Yc2 X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.180 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [1.40 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-git@freebsd.org]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_MEDIUM(0.08)[0.084]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[freebsd.org]; NEURAL_SPAM_SHORT(0.50)[0.498]; NEURAL_SPAM_LONG(0.82)[0.817]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.180:from]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.180:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; TO_DOM_EQ_FROM_DOM(0.00)[] X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.33 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, 20 May 2020 21:09:44 -0000 One of the issues the working group discussed is a desire to possibly rewrite old history after migrating. There are a number of oddities from the CVS to Subversion conversion that persist in a Subversion to git conversion, and we might like to clean these up "eventually." That said, we do not want any such work to hold up the migration. I investigated "git replace", documented as: NAME git-replace - Create, list, delete refs to replace objects SYNOPSIS git replace [-f] ... This replaces adds a record that should instead be . For example, imagine we have a FreeBSD git repo converted from Subversion converted from CVS (commits ordered top to bottom): (G) | (H) | (I) | (J) assuming I and J are "good" commits that we want to keep, and G and H are oddities resulting from the CVS conversion that we'd really prefer to merge into one commit. Then, also assume we have another repo converted from CSRG SCCS history: (A) | (B) | (C) we could rewrite commits G and H above into a new G' from C, and do git replace H G' which gives us history without the oddities: (A) | (B) | (C) | (G') (replaced) | (I) | (J) Internally git handles this with entries in .git/refs/replace - for instance: $ cat .git/refs/replace/f2c6d997d54756ff19a35dd10a6bac76724c811d 53c878b7ea114199534f3f6138d6c23987cc1b43 As far as I know git does not automatically fetch or push the replace refs, which is fine if we're using this just to provide an alternative, cleaned-up view of ancient history. What does this mean for the git migration? We should proceed with the effort as is and not be held up trying to "correct" odd commits prior to src r179447, the first real SVN commit. With git replace we can later retrofit a correct view of the history, and "git log", "git blame" etc. will do the right thing.