From: Junio C Hamano Date: Tue, 08 May 2012 17:02:48 GMT Subject: Re: Git commit path vs rebase path Message-ID: <7vhavqwqpz.fsf@alter.siamese.dyndns.org> In-Reply-To: Steven Penny writes: > Johannes Sixt wrote: >> Are you saying that the new pwd function will also be used on Cygwin? That >> would be a bug. > > The linked patch should fix the problem for _MinGW_ users. > > The problem will persist with _Cygwin_ users. What does a full pathname, fed as a parameter when invoking Windows native binaries like notepad, look like in a Cygwin environment? That is, if you are writing a bash script that is meant to run in a Cygwin environment, and if the script takes the name of a file in the current directory, but it needs to chdir around for its own reasons before spawning notepad on the file, i.e. #!/bin/bash file="$(pwd)/$1" ... cd ..some..where..else..you..have..no..control..over notepad "$file" what is the right incantation to replace `pwd` in 'file="$(pwd)/$1"' above? Whatever that is, using that instead of `pwd` in git-sh-setup.sh here: test -n "$GIT_DIR" && GIT_DIR=$(cd "$GIT_DIR" && pwd) || { would be the solution.