Re: Git commit path vs rebase path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Steven Penny <svnpenn@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]