From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id D1C8A1F55F for ; Thu, 7 Sep 2023 15:46:10 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; secure) header.d=gmx.de header.i=johannes.schindelin@gmx.de header.a=rsa-sha256 header.s=s31663417 header.b=dA0HEG77; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235415AbjIGPYd (ORCPT ); Thu, 7 Sep 2023 11:24:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232655AbjIGPWV (ORCPT ); Thu, 7 Sep 2023 11:22:21 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC05D1BEF for ; Thu, 7 Sep 2023 08:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1694100110; x=1694704910; i=johannes.schindelin@gmx.de; bh=jgvHBqSZtDZnggCirPfxmJn0E3bpLTGXj6gVtRlKkzo=; h=X-UI-Sender-Class:Date:From:To:cc:Subject:In-Reply-To:References; b=dA0HEG775WSHGWL4+IsPN6XrN6yDkS0E6JjRlusEPNOPaN2m/IaUZtdwAfidaM0ojahmdG9 PFR62fCrd3rktYnwLcuULf+t6PF8Au4YtQCq/ihlrFrfKKIQDkk3AH5c3EAkFz83LRzyacJAP cSmeZKUu+bV6F23coAW+KkWm4oIizi1qGKFNWgkbwSkMqZ01e+c+rhEncUI88H0DvpS0W4zeR rdH4RC3FFrTHYMAEtyslVvlucE8TC8c6whwmm9lIomAtcgp6AUD9xj7MARER27Ekr2Hk1JD+r wS14NJajpeFIABwhMpqEIVGdlHjOHOt7HnrYhIPUuE2OZ2Lu9AXA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [172.23.242.68] ([80.151.253.86]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MFsZ3-1qQ9UI2ilz-00HPmp; Thu, 07 Sep 2023 13:03:17 +0200 Date: Thu, 7 Sep 2023 12:24:36 +0200 (CEST) From: Johannes Schindelin To: Christian Couder cc: git@vger.kernel.org, Junio C Hamano , Patrick Steinhardt , Elijah Newren , John Cai , Derrick Stolee , Phillip Wood , Calvin Wan , Toon Claes , Christian Couder Subject: Re: [PATCH v4 12/15] replay: disallow revision specific options and pathspecs In-Reply-To: <20230907092521.733746-13-christian.couder@gmail.com> Message-ID: References: <20230602102533.876905-1-christian.couder@gmail.com> <20230907092521.733746-1-christian.couder@gmail.com> <20230907092521.733746-13-christian.couder@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V03:K1:UQxI3iZ7A9OfVQUZKdUIXRUy3ewBCs1sU/owUuO0fsPTUpAvNpS 0Nv4cCx9A0iVoOOpxp+1/JnKQXB8wL8l0/gpJCnkuVPe+Y8Y/RAp/aUcNCFGlxgjBCxfcjP qdjyztw1q1S82DRE/Tb5OkEAnFsRNzcLdbh6y7uRTPAkvpPk0xtT1Ady+wBpmH8X3cxyvF0 UT1CNtWU31SWSdiLPD9CA== UI-OutboundReport: notjunk:1;M01:P0:+LpJc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el.org Hi Christian & Elijah, On Thu, 7 Sep 2023, Christian Couder wrote: > A previous commit changed `git replay` to make it accept standard > revision ranges using the setup_revisions() function. While this is a > good thing to make this command more standard and more flexible, it has > the downside of enabling many revision related options accepted and eate= n > by setup_revisions(). > > Some of these options might make sense, but others, like those > generating non-contiguous history, might not. Anyway those we might want > to allow should probably be tested and perhaps documented a bit, which > could be done in future work. > > For now it is just simpler and safer to just disallow all of them, so > let's do that. > > Other commands, like `git fast-export`, currently allow all these > revision specific options even though some of them might not make sense, > as these commands also use setup_revisions() but do not check the > options that might be passed to this function. > > So a way to fix those commands as well as git replay could be to improve > or refactor the setup_revisions() mechanism to let callers allow and > disallow options in a relevant way for them. Such improvements are > outside the scope of this work though. > > Pathspecs, which are also accepted and eaten by setup_revisions(), are > likely to result in disconnected history. That could perhaps be useful, > but that would need tests and documentation, which can be added in > future work. So, while at it, let's disallow them too. As pointed out elsewhere in this mail thread, I consider this patch to do more harm than good. After switching the command to plumbingmanipulators it should be possible to just forego all command-line validation and leave that job to the caller. Therefore I would love to see this patch dropped. Ciao, Johannes