From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 81AFA1F4D7 for ; Fri, 15 Apr 2022 20:33:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243002AbiDOUfw (ORCPT ); Fri, 15 Apr 2022 16:35:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232478AbiDOUfv (ORCPT ); Fri, 15 Apr 2022 16:35:51 -0400 Received: from pb-smtp2.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58F0B4D9CA for ; Fri, 15 Apr 2022 13:33:22 -0700 (PDT) Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 9934F10BED0; Fri, 15 Apr 2022 16:33:21 -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=Z7jo4b+OHrQAF4SmlZ68kDC9Ak23/Z7khHks73 TEmBo=; b=Xowydsn0JbQWhdGBL4p+Je2MxszvuYsktuoyD1TsSMxxGx8YhnlKlD /JRwbDo5RkeoUlH6H7uXDp6VpDyZ/qnjtT1SXje+0LveD9HBkvTsuMNC0Rsp0YKj cYXUmHModEDqsR9FGB9NhDrWoto9nx/ee7o0WD8CmM/HzhoQkyJDI= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 90F4010BECF; Fri, 15 Apr 2022 16:33:21 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.105.84.173]) (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 EBC6310BECE; Fri, 15 Apr 2022 16:33:20 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Edmundo Carmona Antoranz Cc: Git List Subject: Re: [RFC] introducing git replay References: <20220413164336.101390-1-eantoranz@gmail.com> Date: Fri, 15 Apr 2022 13:33:19 -0700 In-Reply-To: (Edmundo Carmona Antoranz's message of "Fri, 15 Apr 2022 20:46:12 +0200") 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: 4A3B5AF6-BCFB-11EC-BE5A-CB998F0A682E-77302942!pb-smtp2.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Edmundo Carmona Antoranz writes: > But I am probably wrong in terms of what I understand that you meant. > Can you expand a little bit, if you don't mind? What I had in mind is what I have to do every day multiple times. 'master'..'seen' is a series of merges of tips of different topic branches. ---T topic \ \ \ \ \ --M---o----o----o----S seen ^ master Some of the topic branches may get updated and 'master' may gain more commits by merging some topics. Now it is time to update the 'master'..'seen' chain. ---T---P topic (updated) \ \ \ \ \ --M---o----o----o----S seen \ o \ N master It would be wonderful if a single command like replay can be used to say "In the old history master..seen I have bunch of merges. master used to be M but now it is at N. Rebuild M..S on top of N _but_ with a bit of twist. Some of the topics in M...S may have been merged to 'master' between M..N and the replayed history on top of N does not want to have a merge from such 'already graduated' topics. Many topics are updated, either by adding a new commit on top or completely rewritten, and we want an updated tip of these topic branches, not the old tip that I merged when I created M..S chain, when replaying the history on top of N." That kind of operation is quite different from what "rebase" does, and deserves to be under a different name. Compared to that, "replay exactly the same set of commits in the same shape on top of a different commit whose tree happens to be the same as the original", is a mere special case of "rebase" that is not all that interesting. It may be a worthwhile thing to do to teach "rebase" capable of doing so reliably and more efficiently, but that still falls into "improving rebase" category, not meriting a separate command.