public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: David Karr <davidmichaelkarr@gmail.com>
To: The Cygwin Mailing List <cygwin@cygwin.com>
Subject: Conflict between Eclipse JGit and Cygwin HOME
Date: Mon, 16 Mar 2020 17:23:55 -0700	[thread overview]
Message-ID: <CAA5t8Vo_B+yAwTkUsHFFM1oXo8ntvXduyG-ua-H7oGyenTm=ng@mail.gmail.com> (raw)

I've been running Cygwin on my Windows 10 laptop for quite a while.  I use
git in Eclipse and in the shell.

What I'm describing isn't really a bug with Cygwin, but it breaks because
of the interaction with Cygwin, and I'm trying to find out a reasonable way
to fix this.

Over the weekend, I upgraded Windows 10 from 1709 to 1809.  Somehow after
that I have messed up how git is used in Eclipse.

The Eclipse JGit framework figures out where my git config is by checking
things in the following order:

- 1. %HOME% if set,
- 2. %HOMEDRIVE%\%HOMEPATH%, if %HOMEDRIVE% is set,
- 3. %HOMESHARE% if set,
- 4. Java system property "user.home".

The HOMEDRIVE, HOMEPATH, and HOMESHARE variables are set by my work
infrastructure, and I appear to have no control over them. The resulting
%HOMEDRIVE%\%HOMEPATH% doesn't even exist.

The HOME variable is set by Cygwin, apparently.  It is set to
"/home/<myuid>".  I'm guessing that JGit looks at that and can't do
anything with it, so it goes down the list and doesn't find anything
useful. I end up with bad git config values.

The workaround I've figured out is a batch file that sets HOME to the
expected Windows HOME, and then executes its command-line parameters.  I
changed the target property in the Eclipse shortcut to add the full path to
this batch file at the front of the command line, and then I have to find
the eclipse.exe file and get the desktop icon from it.  I'll have to do
this every time I install a new Eclipse distribution.

             reply	other threads:[~2020-03-17  0:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17  0:23 David Karr [this message]
2020-03-17  1:03 ` Andrey Repin
2020-03-17  6:19   ` Brian Inglis
2020-03-17 13:45     ` David Karr
2020-03-17 20:55       ` Brian Inglis
2020-03-17 20:55       ` Andrey Repin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA5t8Vo_B+yAwTkUsHFFM1oXo8ntvXduyG-ua-H7oGyenTm=ng@mail.gmail.com' \
    --to=davidmichaelkarr@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).