Re: Git commit path vs rebase path
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 8, 2012, 17:02 UTC
- Message-ID
- <7vhavqwqpz.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CAAXzdLW9_O+feVpBhDSXQH_SFRdrct1tjadpFoJ5d7-Qd1LWEg@mail.gmail.com>
Steven Penny <svnpenn@gmail.com> writes:
Show 7 quoted lines
> 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.