Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matlab code doesn't clone properly on case-insensitive file systems #18

Closed
kristjan opened this issue Mar 2, 2015 · 3 comments
Closed

Comments

@kristjan
Copy link

kristjan commented Mar 2, 2015

Here's some fascinating collision behavior for you. On case-insensitive file systems, Git repositories that have two files differing only in case don't clone properly. The just-cloned repo thinks it already has modifications, and attempting checkout just toggles which file it believes was modified!

Since we're unlikely to change people's file systems, perhaps someone with more (any) Matlab knowledge would like to rejigger {R,r}eader.m.

src$ git clone https://github.com/kanaka/mal.git
Cloning into 'mal'...
remote: Counting objects: 4239, done.
remote: Total 4239 (delta 0), reused 0 (delta 0), pack-reused 4239
Receiving objects: 100% (4239/4239), 2.14 MiB | 1.76 MiB/s, done.
Resolving deltas: 100% (2994/2994), done.
Checking connectivity... done.
src$ cd mal
mal(master)$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   matlab/Reader.m

no changes added to commit (use "git add" and/or "git commit -a")
mal(master)$ git checkout matlab/Reader.m
mal(master)$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   matlab/reader.m

no changes added to commit (use "git add" and/or "git commit -a")
mal(master)$ git checkout matlab/reader.m
mal(master)$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   matlab/Reader.m

no changes added to commit (use "git add" and/or "git commit -a")
@kanaka kanaka closed this as completed in 751ab51 Mar 2, 2015
@kanaka
Copy link
Owner

kanaka commented Mar 2, 2015

I moved Reader.m to +types/Reader.m. See if that fixes it for you.

@kristjan
Copy link
Author

kristjan commented Mar 2, 2015

All good 👍 Nice response time!

If you're interested in a solid Torvalds rant about case-insensitive filesystems, https://plus.google.com/+JunioCHamano/posts/1Bpaj3e3Rru (via @rpdillon)

@kanaka
Copy link
Owner

kanaka commented Mar 2, 2015

Welcome.

Yes, case-insensitive file systems probably seemed like a nice user convenience at the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants