git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Copying Git repository from Linux to Windows.

From
Phil Hord <hordp@cisco.com>
Date
Jun 20, 2011, 19:57 UTC
Message-ID
<4DFFA60C.1070006@cisco.com>
In-Reply-To
<201106151614.06529.jnareb@gmail.com>
On 06/15/2011 10:14 AM, Jakub Narebski wrote:
Show 27 quoted lines
>
> core.ignorecase::
>         If true, this option enables various workarounds to enable
>         git to work better on filesystems that are not case sensitive,
>         like FAT. For example, if a directory listing finds
>         "makefile" when git expects "Makefile", git will assume
>         it is really the same file, and continue to remember it as
>         "Makefile".
>
> 	The default is false
>
> But that wouldn't unfortunately help when there are two files which
> filename differs only in case.
>
> You would have to do tricks with `git update-index` and its 
> --assume-unchanged bit (though perhaps `core.ignorecase` would be
> enough) and `--cacheinfo <mode> <object> <path>` together with
> `git hash-object -w`... 
>
> Or perhaps delete file which you have in working area, checkout
> one file, add it, checkout other file, add it, use 'git commit'
> and not 'git commit -a'.
>
> But that are only possible solutions; I have sane filesystem.
>
> Can't you work on NTFS, and use USB stick only for transport of
> either tarred repository, or bundle?

FWIW - NTFS likely does not help here because even though NTFS supports unique-cased filenames, Windows and Win32-apps do not. http://support.microsoft.com/kb/100625

For example,
cmd.exe:
  C:\> touch makefile
  C:\> copy makefile Makefile
  The file cannot be copied onto itself.
          0 file(s) copied.
cygwin/bash:
  $ touch makefile
  $ cp makefile Makefile
  cp: `makefile' and `Makefile' are the same file
Linux (on NTFS volume):
  mnt/NTFS:  touch makefile
  mnt/NTFS:  cp makefile Makefile
  mnt/NTFS:  ls *akefile
  makefile  Makefile

Mac's "HFS Plus" filesystem supports unique-on-case, but it is not safe to enable it on a boot disk. http://support.apple.com/kb/TA21400?viewlocale=en_US

Phil
Previous: Jakub NarebskiNext: Jakub Narebski
Message 16 of 17 in “Copying Git repository from Linux to Windows.”
  1. viresh kumarJun 15, 2011
  2. Andreas EricssonJun 15, 2011
  3. Jakub NarebskiJun 15, 2011
  4. viresh kumarJun 15, 2011
  5. Erik Faye-LundJun 15, 2011
  6. viresh kumarJun 15, 2011
  7. Andreas EricssonJun 15, 2011
  8. viresh kumarJun 16, 2011
  9. Philippe VaucherJun 16, 2011
  10. viresh kumarJun 16, 2011
  11. Johannes SixtJun 16, 2011
  12. viresh kumarJun 16, 2011
  13. Jakub NarebskiJun 16, 2011
  14. viresh kumarJun 17, 2011
  15. Jakub NarebskiJun 15, 2011
  16. Phil HordJun 20, 2011
  17. Jakub NarebskiJun 15, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.