Support Cygwin path translations when running on Win32 with Cygwin
commit76a49993ee4b1d14e1af39a089c416b05b54d548
authorShawn O. Pearce <spearce@spearce.org>
Fri, 28 Mar 2008 21:39:13 +0000 (28 17:39 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 7 Apr 2008 05:06:27 +0000 (7 01:06 -0400)
treea6d713210a564a892f893ce4c06eca54a02d5103
parent1432c8b2ddbabdd285715fbe7a0be58e36014df5
Support Cygwin path translations when running on Win32 with Cygwin

If the user has cygpath.exe in their PATH environment variable that
spawned the JRE we may need to translate paths from the Cygwin UNIX
style into the native Windows paths so that the native Win32 JRE is
able to read them.

This allows jgit to read repositories that are created by a Cygwin
C Git, or that uses Cygwin style symlinks to setup a workdir (where
.git/refs and .git/objects are symlinks to the real repository).

This support isn't quite complete as the ".git/logs/refs" directory
is usually also a symlink, but we don't first resolve it into the
Windows native format.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java
org.spearce.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
org.spearce.jgit/src/org/spearce/jgit/util/FS.java
org.spearce.jgit/src/org/spearce/jgit/util/FS_Win32_Cygwin.java [new file with mode: 0644]