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

Re: FW: Issue in gitbash changing directory

From
Kevin Daudt <me@ikke.info>
Date
Apr 18, 2017, 16:53 UTC
Message-ID
<20170418165330.GB24697@alpha.ikke.info>
In-Reply-To
<DM5PR04MB061992BA437ACAD18A5F44DBC7190@DM5PR04MB0619.namprd04.prod.outlook.com>
On Tue, Apr 18, 2017 at 12:48:09PM +0000, Bonk, Gregory wrote:
Show 8 quoted lines
> 
> I accidently typed 'cd //'  and it worked.
> 
> gbonk@ICC11167 MINGW64 /c/git/mtb-messagehub-information-radiator (master)
> $ cd //
> 
> gbonk@ICC11167 MINGW64 //
> $ cd ..

This has very little to do with git, but more with bash (the shell that is interpretting the command. From a bash FAQ [1]:

Show 9 quoted lines
> E10) Why does `cd //' leave $PWD as `//'?
> 
> POSIX.2, in its description of `cd', says that *three* or more leading
> slashes may be replaced with a single slash when canonicalizing the
> current working directory.
> 
> This is, I presume, for historical compatibility.  Certain versions of
> Unix, and early network file systems, used paths of the form
> //hostname/path to access `path' on server `hostname'.
So this is kind of intentional.
[1]: https://tiswww.case.edu/php/chet/bash/FAQ
Previous: Bonk, Gregory
Message 2 of 2 in “FW: Issue in gitbash changing directory”
  1. Bonk, GregoryApr 18, 2017
  2. Kevin DaudtApr 18, 2017

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.