zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: <zsh-workers@zsh.org>
Subject: Re: [PATCH] vcs_info: add 'find-deepest' zstyle
Date: Sun, 25 Oct 2020 20:04:09 +0000	[thread overview]
Message-ID: <20201025200409.405e8d9c@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <CAH+w=7ZcVgo8JK_2=zw1qNjOBm71QNGr9ppEARsnM_afp2phvQ@mail.gmail.com>

Bart Schaefer wrote on Fri, 23 Oct 2020 17:56 -0700:
> On Fri, Oct 23, 2020 at 5:13 PM Frank Terbeck <ft@zsh.org> 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


  reply	other threads:[~2020-10-25 20:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23  8:34 Aleksandr Mezin
2020-10-23 23:48 ` Daniel Shahaf
2020-10-24  0:13   ` Frank Terbeck
2020-10-24  0:56     ` Bart Schaefer
2020-10-25 20:04       ` Daniel Shahaf [this message]
2020-10-24  2:31     ` Oliver Kiddle
2020-10-25 19:54       ` Daniel Shahaf
2020-10-25 23:13         ` Frank Terbeck
2020-10-26 20:58           ` Daniel Shahaf
2020-10-27  1:01             ` Frank Terbeck
2020-11-04  8:42               ` Daniel Shahaf
2020-10-28  1:33   ` Aleksandr Mezin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201025200409.405e8d9c@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).