Thread (15 messages) flat view 15 messages, 4 authors, 2016-06-15

Re: Git commit path vs rebase path

From: Steven Penny <hidden>
Date: 2016-06-15 22:53:47
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help