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: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.4 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id C67E41F8C6 for ; Tue, 31 Aug 2021 05:55:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238657AbhHaF4r (ORCPT ); Tue, 31 Aug 2021 01:56:47 -0400 Received: from bsmtp2.bon.at ([213.33.87.16]:50526 "EHLO bsmtp2.bon.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229759AbhHaF4q (ORCPT ); Tue, 31 Aug 2021 01:56:46 -0400 Received: from [192.168.0.98] (unknown [93.83.142.38]) by bsmtp2.bon.at (Postfix) with ESMTPSA id 4GzGdL53Fdz5tlF; Tue, 31 Aug 2021 07:55:50 +0200 (CEST) Subject: Re: [PATCH] rebase, cherry-pick, revert: only run from toplevel To: Elijah Newren Cc: git@vger.kernel.org, Elijah Newren via GitGitGadget References: From: Johannes Sixt Message-ID: <38fef2e3-a78a-c83b-85f8-dae064931703@kdbg.org> Date: Tue, 31 Aug 2021 07:55:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Am 31.08.21 um 05:03 schrieb Elijah Newren via GitGitGadget: > From: Elijah Newren > > Allowing rebase, cherry-pick and revert to run from subdirectories > inevitably leads to eventual user confusion. For example, if they > are within a directory that was created by one of the patches being > rebased, then the rebase operation could hit a conflict before the > directory is restored leading the user to be running from a directory > that no longer exists. Similarly with cherry-pick and revert, those > operations could result in the directory being removed. > > Similar to bisect, simply require that these commands be run from the > toplevel to avoid such problems. I am not a friend of this change. I understand the motivation behind it. But most of the time, rebase and cherry-pick are operated on own code, where directories do not disappear and appear at random, and this new enforced condition becomes awkward. One of my use-cases is that I operate git-rebase from an untracked build directory inside the repository. Having to pass -C .. all the time strikes the wrong balance, IMO. Things are slightly different for git-bisect (at least for me), because oftentimes it is operated on foreign code, where you may not know which directories come and go. But even that is a weak argument to force the command to the top-level of the repository. Perhaps it is sufficient to force git-pull to the top-level (if it isn't already). -- Hannes