Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH 2/3] vcs_info/cvs: set vcs_comm[basedir] in VCS_INFO_detect_cvs
- X-seq: zsh-workers 44941
- From: "Daniel Shahaf" <d.s@xxxxxxxxxxxxxxxxxx>
- To: "Aleksandr Mezin" <mezin.alexander@xxxxxxxxx>
- Subject: Re: [PATCH 2/3] vcs_info/cvs: set vcs_comm[basedir] in VCS_INFO_detect_cvs
- Date: Tue, 26 Nov 2019 04:52:01 +0000
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=mime-version:message-id:in-reply-to :references:date:from:to:cc:subject:content-type :content-transfer-encoding; s=fm1; bh=pwynGWNAprq70oBXwGMzQaiuWP rFAihUFZ6vdWTPLr4=; b=lImuiYgzuDU8xI50KA7B7oyR4ilqmpb6UW+Vzglc03 y+q/tFvq9Sw1t2Nff6S58M4qXzzAco14syJDyAY9FxWa4Idt0BvpdkTuvAzzAtvu 4lSXXgLGmqJuApaCyN+KqWHHZzFTgeYCpbwTMDOFBrdfKPTyWrWVblM3ChCcaLBx LyJzAKm2m3f63Ctsw5CK9JSoi1PPJpNss8bmBZuES8yRn6DOXPvB29UUEkckmpsi ilOEdm3hpfUS/eRT3uLgIejUZcqpnZ2SX2t1GxXxF8sEkUp9mr1GW3M0XxLXVjF3 3AbNg6Zwe5bO6EQPAdp1/6Vyv5spSLny00CYXjyfknQA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=pwynGWNAprq70oBXwGMzQaiuWPrFAihUFZ6vdWTPL r4=; b=XzUkvGA3eUoNzKGwQ94Jl+I2SGeUwU4Ks50I1Mkua6HX7Oac321tjIfe6 ERnfszuiWXrJdBR4gkXd50wwz+qS4AFKiZHw2dC17s9vKDJwnwOCsvHBr3f4FBpg 4PmIGTZYFkvUCSQ3smN1edIWLBeMm/M7zkoj7H8RYgz+j8d/Ec3TzNlUsacN4PQn pEBP94URwzFl5Oa1AJe4qWHzq965BdlVXan8pa+v0JMflaSKWaSwQCdiFRTFGlGe 8zy3h9jLIGPsim+hYRAem0hvAPxEruAVhzoPBsCWfjeSFrM6kVr0u44Roq3ltfhl 0AMH1fWqoqpOuICRy6bXAUJktwo7A==
- In-reply-to: <CADnvcfL1nxLdL_fXpP1YDCgRHyrMvzT8VjwKr_77d8=znCv88A@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20191123221443.279556-1-mezin.alexander@gmail.com> <20191123221443.279556-3-mezin.alexander@gmail.com> <20191125043525.lcxm532gi6hb7n53@tarpaulin.shahaf.local2> <CADnvcfJsh2zvSDNoCknSxXv3PGsYG9dK5-WGGYoMLQx9aDKdKQ@mail.gmail.com> <e4246cb5-863e-4628-beca-4698ab057480@www.fastmail.com> <CADnvcfKx-FCfKWaP3DgMZ12qoVMH1voQvtR333NnggHJq1P+KA@mail.gmail.com> <CADnvcfL1nxLdL_fXpP1YDCgRHyrMvzT8VjwKr_77d8=znCv88A@mail.gmail.com>
Aleksandr Mezin wrote on Tue, 26 Nov 2019 01:28 +00:00:
> On Tue, Nov 26, 2019 at 7:26 AM Aleksandr Mezin
> <mezin.alexander@xxxxxxxxx> wrote:
> >
> > On Mon, Nov 25, 2019 at 2:17 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> > > Two, as I pointed out in reply to an offlist response, the existence of
> > > $GIT_DIR and $GIT_WORK_TREE means that the two VCS's basedirs need not
> > > be in a parent dir – subdir relationship with each other; they can be
> > > /foo/bar and /foo/baz.
> >
> > How is it possible?
% cd "$(mktemp -d)"
% hg init foo
% git init bar
% cd foo
[shows hg info]
% export GIT_WORK_TREE=${PWD/foo/bar} GIT_DIR=${PWD/foo/bar}/.git
[shows git info]
%
> > in a git repository
> >
> > $ GIT_WORK_TREE=../other-dir git rev-parse --is-inside-work-tree
> > false
> >
> > Work tree root should be a parent of cwd, otherwise `rev-parse
> > --is-inside-work-tree` returns false -> git repository not detected.
> > And there is only one path from cwd to the root -> all parents of cwd
> > are parents or subdirs to each other.
>
> I meant "there is only one path from cwd to /" in the last sentence.
>
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author