Subject: Re: Git bug report CDPATH completion

From: Junio C Hamano <[email-masked]>
Date: Mon, 11 Mar 2024 11:13:47 -0700

Philemon GIRAUD <[email-masked]> writes:

> What did you do before the bug happened? (Steps to reproduce your issue)
> This bug is about the "git bash" that comes with git for windows
> I added "export CDPATH=.:/c/some/path" to my .bashrc

FYI, https://news.ycombinator.com/item?id=19886334 is the first hit
when I asked "exporting CDPATH" to my search engine.  It makes an
interesting and educational read.  In short, setting CDPATH in your
interactive environment, i.e.  your .bashrc having CDPATH=..., is a
fine convenience measure, exporting it to environment is not.

In addition to what people wrote there, it would break many
third-party shell scripts that expect their "cd" to work without
getting affected.  We even explicitly unset CDPATH in our
(remaining) shell scripted Porcelain commands to avoid the insanity
of it the first thing.