git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ricky Clarkson <ricky.clarkson@gmail.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: git@vger.kernel.org
Subject: Re: Case sensitivity on Windows for absolute paths.
Date: Sun, 25 Apr 2010 08:33:22 +0100	[thread overview]
Message-ID: <j2y7eeb06461004250033ue4434a41j7b9a752dea1f5fe1@mail.gmail.com> (raw)
In-Reply-To: <201004232146.56424.j6t@kdbg.org>

Hi again,

It would be good if git automatically uppercased the drive letter,
yes.  However, I found the real root of my problem.  Git Bash
(msysgit) sets the working directory to c:\foo for programs launched
if the working directory within it is /c/foo.  Like having spaces in
filenames, that just uncovers a whole myriad of small bugs and
oddities in other programs.

For reference, Cygwin doesn't have that problem; cd /cygdrive/c/foo &&
cmd, cmd gets C:\foo as its working directory.

So to make what I wanted work, I just made sure everything msysgit
installed be on the PATH, then ran everything from cmd.

I hope that this helps the next person who experiences this problem.

Thanks,
Ricky.

--
Ricky Clarkson
Java and Scala Programmer, AD Holdings
+44 1928 706373
Skype: ricky_clarkson
Google Talk: ricky.clarkson@gmail.com
Google Wave: ricky.clarkson@googlewave.com



On 23 April 2010 20:46, Johannes Sixt <j6t@kdbg.org> wrote:
> On Freitag, 23. April 2010, Ricky Clarkson wrote:
>> I noticed that if I have a git repository at C:\foo, and there is a
>> file in there named bar, git add bar works fine, git add C:\foo/bar
>> works fine but git add c:\foo/bar does not.  git reports that the file
>> 'is outside repository'.  Looking at setup.c it seems that string
>> comparisons are being used to determine whether a file is within the
>> repository.
>
> Yes, we should be a bit more liberal when drive letters are compared; they
> should be treated in a case-insensitive manner, but currently we are strict.
>
>> For my purposes I can probably make a Windows build that does it while
>> ignoring the case, but is there a more proper way that git should do
>> it?  I'm not familiar enough with the POSIX file routines to know.
>
> My guess is that it is sufficient that
>
> 1. the internal version of GIT_DIR is recorded with an uppercase drive letter;
>
> 2. normalize_path_copy() upper-cases the drive letter.
>
> Then the comparison in prefix_path() should do the right thing.
>
> -- Hannes
>

  reply	other threads:[~2010-04-25  7:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-23 14:12 Case sensitivity on Windows for absolute paths Ricky Clarkson
2010-04-23 19:46 ` Johannes Sixt
2010-04-25  7:33   ` Ricky Clarkson [this message]
2010-04-25 18:08     ` Johannes Sixt
2010-04-25 18:47       ` Ricky Clarkson

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=j2y7eeb06461004250033ue4434a41j7b9a752dea1f5fe1@mail.gmail.com \
    --to=ricky.clarkson@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.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).