From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D2E6C43334 for ; Wed, 8 Jun 2022 02:15:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236839AbiFHCOg (ORCPT ); Tue, 7 Jun 2022 22:14:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443849AbiFHCGr (ORCPT ); Tue, 7 Jun 2022 22:06:47 -0400 Received: from pb-smtp2.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2E3647F169 for ; Tue, 7 Jun 2022 15:23:11 -0700 (PDT) Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 27B3E126A69; Tue, 7 Jun 2022 18:23:10 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=+ZhrzMVLyRRUOS1XYExFJgQbws+w+PCkDY3TPV u6qJo=; b=U00LY3arzAw1FKs67UxjhVR1XKNeSPLg+ol2jDfoHPJvrSlnpj+nml NnwT+JtYck7EaNPT8qZ35aS0O9y2rB+Q3A4uj0aLMaCBY5/+yDwdfvO9WtAjavOb xz7pJ1jzWk6A/PebHGZqdnUnhDBIosBR4PHaILpGKTJ/Vq/EKeiKA= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 1F1F9126A67; Tue, 7 Jun 2022 18:23:10 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.83.92.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 835AE126A66; Tue, 7 Jun 2022 18:23:09 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: "Derrick Stolee via GitGitGadget" Cc: git@vger.kernel.org, johannes.schindelin@gmx.de, me@ttaylorr.com, Jeff Hostetler , Phillip Wood , Elijah Newren , Derrick Stolee Subject: Re: [PATCH v2 6/7] sequencer: implement 'update-refs' command References: <68f8e51b19c024e1cb075dffd07f81cceaba5957.1654634569.git.gitgitgadget@gmail.com> Date: Tue, 07 Jun 2022 15:23:08 -0700 In-Reply-To: <68f8e51b19c024e1cb075dffd07f81cceaba5957.1654634569.git.gitgitgadget@gmail.com> (Derrick Stolee via GitGitGadget's message of "Tue, 07 Jun 2022 20:42:48 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 6938D1DE-E6B0-11EC-9860-CB998F0A682E-77302942!pb-smtp2.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org "Derrick Stolee via GitGitGadget" writes: > From: Derrick Stolee > > The previous change allowed 'git rebase --update-refs' to create 'label' > commands for each branch among the commits being rewritten and add an > 'update-refs' command at the end of the todo list. Now, teach Git to > update the refs during that final 'update-refs' command. > > We need to create an array of new and old OIDs for each ref by iterating > over the refs/rewritten/for-update-refs/ namespace. We cannot update the > refs in-place since this will confuse the refs iterator. In other words, grab everything we need to do and then use that in-core information to tell refs API what refs to change to what values? That dounds like a quite reasonable thing to do. Looking at the patch text, the only thing that stands out at me is that this does not seem to perform the updates in a single transaction, which may often not matter in practice, but may be a prudent thing to do anyway at philosophical level. Thanks, will queue.