Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] vcs_info: add 'find-deepest' zstyle
- X-seq: zsh-workers 47498
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] vcs_info: add 'find-deepest' zstyle
- Date: Sun, 25 Oct 2020 20:04:09 +0000
- Archived-at: <https://zsh.org/workers/47498>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-10/20201025200409.405e8d9c%40tarpaulin.shahaf.local2>
- Authentication-results: zsh.org; iprev=pass (out4-smtp.messagingengine.com) smtp.remote-ip=66.111.4.28; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:subject:message-id :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=fm1; bh=lLu/aNSvERK7MlOK4HX17MxTH6 hYXiWYuCdSdeURm/A=; b=JrFPkrrNjMfmJs+GG6tqGPbXvK3cKJUhDid6/39WsY hGWdul6uKM/cx3B9F7WGAB5sCsWtkhY/OJEE3Uraib/yKUzxFRpwQ9YUxOodGN3Z SVYyf2lnKGHTmFrch+sTTqUrG81byb1tEhDD4dUL0xHdLHtcRwz2YFJL9sx3rWrV KGlPkBvwXRY4/ZeppMukzhOPXyveCfhb3n0lUUBZJb4T/+HgeRqyOUyPsPzjCZ4Y slZmOHAUy97buOvxr8iK3eL50A/xKJWqv2iX1NGt0UKWzzHSNXcURRMBtvTRKLVu hnMRnTzvhsHxf0TcBpN7+VR0Mf8B2q72FNl79BG/JfAg==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=lLu/aNSvERK7MlOK4HX17MxTH6hYXiWYuCdSdeURm /A=; b=IwYCj9TNtRYqp+y7BLS3l5/zK52UkUGMMRXO6LxvfeHujKRvDYV5AWoha 9RcqixwOiS+o0NAM7Kf2rMbZ/K7nyHGXZ57GQZRH0dFlkSmIzXJ4dg1a5HJnsDJ0 V/MnNhiqEtTsgq0jHRUtKBJgFPE+gP5JFL0YjL/tXTk6+iIbSe68KJ4YMa6zELuj HrC7paHyONyE9xlUl8bSTZ1ShGO8Jg24mQDXA96pSupvo+20xziVhpFKUGYXXH3v 9NjZpU6/o5Awp25aDhVRDWSxYH5q6UsBerjCIirKkI/oW2/A++ANtG0QanhSrlQ8 BfOS75fgq+ij2baB5OAPEI2C2umEg==
- In-reply-to: <CAH+w=7ZcVgo8JK_2=zw1qNjOBm71QNGr9ppEARsnM_afp2phvQ@mail.gmail.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- References: <20201023083444.1565608-1-mezin.alexander@gmail.com> <20201023234855.5a0c6290@tarpaulin.shahaf.local2> <87mu0clbw2.fsf@ft.bewatermyfriend.org> <CAH+w=7ZcVgo8JK_2=zw1qNjOBm71QNGr9ppEARsnM_afp2phvQ@mail.gmail.com>
- Sender: zsh-workers-request@xxxxxxx
Bart Schaefer wrote on Fri, 23 Oct 2020 17:56 -0700:
> On Fri, Oct 23, 2020 at 5:13 PM Frank Terbeck <ft@xxxxxxx> wrote:
> >
> > 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.
>
> At my $WORK we have two related but distinct code bases, an older
> version of the platform that is maintained for several longtime
> customers and the modern version used by all new customers. The old
> code base is in CVS, the new code base (which incorporates a large
> subset of the old) has been moved to git. Occasionally there are
> bugfixes that need to be ported from one to the other within that
> shared subset. Maintaining nested repositories has been useful for
> this situation, but it's difficult to get vcs_info to select the
> correct one.
>
> That said, I'm not sure "deepest" reflects the right behavior either.
> I'd pretty much need to select the repository that differs from the
> current working file, whichever one that is at the time.
At the risk of veering off-topic, how about running vcs_info twice
(with different argv[1] values for zstyle purposes) and have it print
_both_ the CVS info and git info every prompt. Something like:
precmd() {
vcs_info
print -rPC1 -- $vcs_info_msg_0_
local tmp=$vcs_info_msg_0_
vcs_info foo
if [[ -n $vcs_info_msg_0_ && $vcs_info_msg_0_ != $tmp ]]; then print -rPC1 -- $vcs_info_msg_0_; fi
}
zstyle ':vcs_info:*:foo:*' enable …
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author