Re: [bug] Possible Windows 'git mv' bug
- From
Doug Kelly <dougk.ff7@gmail.com>
- Date
- Jan 31, 2016, 15:05 UTC
- Message-ID
- <CAEtYS8Qt1ewf3nAAiP_2ey5mV=9e3_To1fcaeV6f3+05uwHxgg@mail.gmail.com>
- In-Reply-To
- <56AE1F40.8060509@kdbg.org>
On Sun, Jan 31, 2016 at 8:50 AM, Johannes Sixt <j6t@kdbg.org> wrote:
Show 29 quoted lines
> Am 31.01.2016 um 15:03 schrieb Aaron Gray: >> >> Hi, >> >> I think I have found a possible difference in behaviour between >> Windows git commandline distro and Linux git >> >> basically If I do a :- >> >> git mv logger.h Logger.h >> >> I get the following :- >> >> fatal: destination exists, source=lib/logger.h, >> destination=lib/Logger.h >> >> It looks and smells like a bug to me ! > > > Not really. When you attempt to overwrite an existing file with 'git mv', > you get this error message on both Windows and Linux. > > The difference is that logger.h and Logger.h are the same file on Windows, > but they are not on Linux. Hence, when you attempt to overwrite Logger.h on > Windows, you see the error because it exists already (as logger.h). > > As a work-around, you can use -f. > > -- Hannes
Indeed. And just to clarify, you'll get the same issue on OS X, where the filesystem is also case-preserving, not case-sensitive (by default, at least). I've never tried using -f for this, but I'll usually use git mv twice to achieve the same result. Annoying, but that way my local directory looks correct, too.