From: Geofrey Sanders <geofrey.sanders@gmail.com>
To: git@vger.kernel.org
Subject: Windows path handling changed between versions
Date: Tue, 1 Sep 2015 12:55:38 -0400 [thread overview]
Message-ID: <CAFPYLHASH_LZ2YgQWjfPKCwq_n-9HVNotkimiQDY1Qy8_8gtwg@mail.gmail.com> (raw)
I recently upgraded from Windows Git 1.6.2 to 2.5.0 and found myself
unable to rebase. Turns out paths didn't used to be case-sensitive and
now they are, causing a number of operations to halt. A repo created
by pointing at the directory
c:\core\guidewire\Dev\2.4
would (I suppose) technically have been invalid the whole time because
Windows reports the current path as
C:\core\guidewire\Dev\2.4
, but msys Git 1.6.2 evidently made a case-insensitive path comparison
so the discrepancy was suppressed.
The proximate cause of errors was
git rev-parse --is-inside-work-tree
which would output 'false' even inside the working tree.
"--is-inside-git-dir" also printed 'false' in directories where it
should have said 'true'. I actually missed the problem in plain sight
at first, because I created a new repo (in which everything worked as
expected), and then did a directory diff... the worktree paths were
different but I only noticed the names, not the case difference in the
drive letter. More details in this SO question:
http://stackoverflow.com/q/32280644/2835086
I was able to repair my existing repos by changing the 'worktree'
value in gitconfig - s/c/C/ did the trick - but the whole thing was a
surprise.
Is this a bug in the current version? Windows doesn't distinguish on
case, so maybe applications shouldn't either.
Was this a bug in the prior version? Maybe creating a repo with a
worktree path that doesn't match the file system should have been an
error from the very beginning.
Was this user error? Maybe I did something wrong and should have known
better, but got away with it for a while.
Any feedback welcome,
-gws
next reply other threads:[~2015-09-01 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 16:55 Geofrey Sanders [this message]
2015-09-01 17:30 ` Windows path handling changed between versions Johannes Schindelin
2015-09-01 19:10 ` Geofrey Sanders
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=CAFPYLHASH_LZ2YgQWjfPKCwq_n-9HVNotkimiQDY1Qy8_8gtwg@mail.gmail.com \
--to=geofrey.sanders@gmail.com \
--cc=git@vger.kernel.org \
/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 NNTP newsgroup(s).