From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12401 invoked from network); 24 Oct 2020 00:13:23 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 Oct 2020 00:13:23 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1603498403; b=LwDqWzGQXeyQrMZYH+bMdUg+EAIImyXBskyTGio0Ow3l8q1FexSWQBVgwTCFtiqZBsKCY4cNxJ yI0JENuahX1wVSj9LROckj5kx2gdIPJEEg8Uo3t0qfd++RfoP7QOW7OecVSaaihBqiALpMtfMH RCYAr8wasQv0xg/nltscJvGJpRNPHVBna7o6rAuwkSNlgg/XgzbekKNufCHQrAZJuMGpr0/9sn 4/mv2G6Z4YZ6n7qNSWw6T0LCl6VQMU035kYgSPdwjXXX4lP/H4+jJ2xNJaVL9SMjiqJcGCmWdX DPZt2aE11P7c00wpAVm3M/xTCe68uUL+lgzuIIh0J1BLMQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtprelay03.ispgateway.de) smtp.remote-ip=80.67.29.7; dmarc=none header.from=zsh.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1603498403; bh=TdR0fQDbSsidJYCqJMg44HTz8mLPASV/E3TK9DbTQnI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:To:From:DKIM-Signature; b=VYHWsB8P2dtcmFuHgPMJ9oBf0D9Fa6+UBM761EQFFAp60NpxFKuYe5UHmOIGh2R/bVihLoRpbI iotai2cgSC8+nFw6Fk4dDT5fVYiBM04d45iR/zcC3++DPB07YAuvFeb8+kbDeOVFvJ2yoAaQQ8 oQPJh0A7A5WraUzCFESxKs6LZDYkJFgT9AhNJe7xnbysjkAFG+7WWFe4hh6ZUnFKYv+otkElSI iZsUu8hS8/twIdoMUdBxiyIYleN969sHf2mxhM/TY7jWbnuKTbPlW0+D6NSLjVYu+73jobxLq8 hkjgXbilZ6B+gGnjOTcZxhvjOY90ABIlWfnkFA/RT8RWmg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:MIME-Version:Message-ID: Date:References:In-Reply-To:Subject:To:From:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=gpUxOliSRKJPBPncOaIZBJrq2PQ+8cD4OTflOUUolME=; b=Qch3nU6JTN4+qLJ4O3Up6fhCBJ fsDWOAh8SUqsnEZtVMQOsgKMVJySLk7ZLq+2a6me+VXlE7ym6sFcGJFvCcoxyxJMF2QMvc4bqLwS5 pUPCQTJE7aeBDL8iEtKUpXXW2M+9TVy3ZtFZSJnHrW0Wfp2bnKgdx/c77PbyV9JGuNd7s5j55sNAq uSh97Z4O60LGtK8NXD6x7OeCxTx7L7qHKZpVgojB8MHQih2iPIFpUiHYxGrtOA5WEzytPalgxq62M empfG5QnGug4isq2zcIOwWfbtrfz4NcEm7td96+gpbhbogSpGTPyXKKXDU6/c4FDJOXx0qMk6zZ2O SOHyM+7w==; Received: from authenticated user by zero.zsh.org with local id 1kW7BT-000JHd-BL; Sat, 24 Oct 2020 00:13:23 +0000 Authentication-Results: zsh.org; iprev=pass (smtprelay03.ispgateway.de) smtp.remote-ip=80.67.29.7; dmarc=none header.from=zsh.org; arc=none Received: from smtprelay03.ispgateway.de ([80.67.29.7]:61397) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1kW7BG-000J9Y-3K; Sat, 24 Oct 2020 00:13:10 +0000 Received: from [80.141.186.10] (helo=jim.voodoo.lan) by smtprelay03.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1kW7BF-0006AB-8D for zsh-workers@zsh.org; Sat, 24 Oct 2020 02:13:09 +0200 Received: by jim.voodoo.lan (Postfix, from userid 1000) id 3AD2262C084; Sat, 24 Oct 2020 02:13:01 +0200 (CEST) From: Frank Terbeck To: zsh-workers@zsh.org Subject: Re: [PATCH] vcs_info: add 'find-deepest' zstyle In-Reply-To: <20201023234855.5a0c6290@tarpaulin.shahaf.local2> (Daniel Shahaf's message of "Fri, 23 Oct 2020 23:48:55 +0000") References: <20201023083444.1565608-1-mezin.alexander@gmail.com> <20201023234855.5a0c6290@tarpaulin.shahaf.local2> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Sat, 24 Oct 2020 02:13:01 +0200 Message-ID: <87mu0clbw2.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: NDMwNDQ0 X-Seq: 47488 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: Daniel Shahaf wrote: > Aleksandr Mezin wrote on Fri, 23 Oct 2020 14:34 +0600: >> Currently, vcs_info iterates over enabled VCS backends and outputs repository >> status from the first backend that works (i.e. first backend that can find a >> repository). >> >> But I prefer a different behavior: I want to see the status of the repository >> closest to the current working directory. For example: if there is a Mercurial >> repository inside a Git repository, and I 'cd' into the Mercurial repository, >> I want to see the status of Mercurial repo, even if 'git' comes before 'hg' in >> the 'enable' list. > > I suppose that's the Right thing to do in most cases: e.g., it's > context-sensitive whereas the 'enable' style's value doesn't usually > depend on the current directory. > > (Separately, in your example it might be nice to indicate that there's > an "outside" Git repository, but that'd be a separate feature request.) > >> Because some people, apparently, want the old behavior of vcs_info, > > What's those people's argument? The default behaviour should be decided > on on this list, not simply announced to this list as a _fait accompli_. I, for one, vastly prefer the current behaviour. I don't think nesting repositories is all that common. Even when I was using many different systems, never did I have a need for that. The most common reason I heard in the past, when this came up is, wan- ting to keep all of $HOME in git, which I consider borderline insane. What the current behaviour permits is to set the enable style in the order of probability. That way the most common system you use gets checked first, cutting down on detection time. Since some systems take a fair bit of time to do detection, I deemed this reasonable at the time this was written. And like I said, I think this is still the preferable default choice. I skimmed over the patch and I like the limited amount of changes that are required to get the other behaviour. So I think something along those lines should go in. But I'd prefer the default as it is. Regards, Frank