X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 	tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4B15868D.7010809@bopp.net>
References: <db95995b0912011243y3e75f0afqa5fb2d41d7d40540@mail.gmail.com> 	 <4B15868D.7010809@bopp.net>
Date: Wed, 2 Dec 2009 10:50:43 +1300
Message-ID: <db95995b0912011350q4b5f9bbdk1003e926d70a9fdd@mail.gmail.com>
Subject: Re: [1.7] git-difftool paths unusable by win32 kdiff3
From: David Antliff <david.antliff@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Wed, Dec 2, 2009 at 10:11, Jeremy Bopp wrote:
> David Antliff wrote:
>> On the other hand, this command does work:
>>
>> kdiff3 --auto --L1 "build.xml (A)" --L2 "build.xml (B)"
>> c:/cygwin-1.7/tmp/Vc0BZy_build.xml build.xml
>
> As a fairly simple workaround, you could create a wrapper script which
> takes the same set of arguments git difftool gives to kdiff3 and
> converts the given file paths using cygpath -w before exec'ing the real
> kdiff3. =A0Then you can point to that wrapper by setting the git
> configuration variable difftool.kdiff3.path to the path for the wrapper
> script. =A0Run "git difftool --help" for more information.

Jeremy, thank you for your reply.

It's slightly more complicated than this, because I need a way to
translate "/tmp" to the Cygwin installation directory. I.e. it's not a
simple case of replacing "/tmp" with "c:/tmp" but rather
"$CYGWIN_INSTALL_DIR/tmp" and I'm not sure CYGWIN_INSTALL_DIR or
anything similar exists.

This is because my users have cygwin installed in different places.
For example, some have it on "c:\cygwin", others "d:\cygwin" and even
"c:\cygwin-1.5" or  "c:\cygwin-1.7". I need a general way to determine
the Cygwin installation path. Any ideas? Is there a supported way for
a script to determine the Cygwin installation directory, perhaps
relative to /cygdrive or as a DOS path?

-- David.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

