On Sun, Jul 09, 2006 at 08:44:07 -0400, David Roundy wrote: > > I wonder if it would be super-ugly for us to make a wrapper script > > that calls cygpath on all arguments. Or if there exists a library > > version or something that we could invoke via FFI. > > Indeed, that would be a reasonable approach. We'd just need something > like a "work around cygwin" flag to control this behavior?
grepping the source code shows gitlib.c:#ifdef __CYGWIN__ I'm guessing this flag is set when compiling against cygwin So here's what I propose as a set of actions a Windows developer might undertake (any volunteers?) Plan A ------ 1. Determine if the cygwin lib exposes the path handling bits used to make Windows and cygpaths transparant (as Olivier mentions). Is it a black box, or can we just invoke the stuff ourselves? 2. If we can invoke it ourselves, write an FFI wrapper for said functions Plan B ------ 1. Look at the Cygpath C++ source: http://tinyurl.com/famkm 2. Reimplement in 3 lines of Haskell or less :-) Plans A+B --------- 3. Provide a function windowsToUnixPath :: FilePath -> FilePath that translates filepaths like "Z:\Program Files\Foo\Bar" into /cygpath/z/foo/bar 4. Wrap the relevant SSH functions with something like #ifdef __CYGWIN paths = map windowsToUnixPath paths_ #else paths = paths_ #endif Does this sound right? Any takers? -- Eric Kow http://www.loria.fr/~kow PGP Key ID: 08AC04F9 Merci de corriger mon français.
pgp25O9LDrJM7.pgp
Description: PGP signature
_______________________________________________ darcs-users mailing list [email protected] http://www.abridgegame.org/mailman/listinfo/darcs-users
