Re: Git commit path vs rebase path
- From
Steven Penny <svnpenn@gmail.com>
- Date
- May 8, 2012, 22:47 UTC
- Message-ID
- <CAAXzdLVj0szCgpdOSdhnLdkBKAM+e6vrQpvrsz4HeUo+Nh1K6A@mail.gmail.com>
- In-Reply-To
- <7v1umuwpo9.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Actually, the above is stated rather poorly. The path that ends up in > $file must be usable by both Windows native and Cygwin programs, as the > user may be using "vi" from Cygwin, or "notepad" like your example.
Excellent point.
I ran some test and this is what I came up with
# VI /cygdrive/c/test/hello.sh # works C:\test\hello.sh # works C:/test/hello/sh # works
# NOTEPAD /cygdrive/c/test/hello.sh # does not work C:\test\hello.sh # works C:/test/hello.sh # works
so the best compromise would be "C:/test/hello.sh" which can be created with
diff --git a/git-sh-setup.sh b/git-sh-setup.sh index 7b3ae75..ba198d2 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -260,6 +260,11 @@ case $(uname -s) in return 1 } ;; +*CYGWIN*) + pwd () { + builtin cygpath -m + } + ;; *) is_absolute_path () { case "$1" in http://github.com/svnpenn/git/commit/692bc