git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git bug report CDPATH completion

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 11, 2024, 18:13 UTC
Message-ID
<xmqq8r2or604.fsf@gitster.g>
In-Reply-To
<AM6PR10MB28087CFD43779194563F558492242@AM6PR10MB2808.EURPRD10.PROD.OUTLOOK.COM>
Philemon GIRAUD <philemon.giraud@metrologic.group> 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.

Previous: Philemon GIRAUDNext: brian m. carlson
Message 2 of 3 in “Git bug report CDPATH completion”
  1. Philemon GIRAUDMar 11, 2024
  2. Junio C HamanoMar 11, 2024
  3. brian m. carlsonMar 11, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.