Search code examples
gitgithubopenfoam

Fresh git clone showing changed files


I am doing a clone of a git repository and I am finding changed files. I have looked at some of the other posts with similar issues, but as of yet the steps don't seem to help. I have tried adjusting the autocrlf settings, the case settings and some of the other configurations, but I am still seeing modified files, when I do 'git status'.

The configurations from the core section of the .git/config is:

repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = false
precomposeunicode = true
autocrlf = false

A truncated sample of paths that are being shown as modified are:

modified:   applications/test/Dictionary/Make/files
modified:   applications/test/Dictionary/Make/options
modified:   applications/test/Dictionary/Test-Dictionary.C
modified:   src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolation.H
modified:   src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.H
modified:   src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C
modified:   src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.H
modified:   src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixATmul.C
modified:   src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C

A truncated sample of paths that are being shown as untracked are:

applications/test/Dictionary/Test-dictionary.C
applications/test/Dictionary/testDict
applications/test/Dictionary/testDict2
applications/test/Dictionary/testDictInc
applications/test/Dictionary/testDictRegex
applications/test/Dictionary/value
src/OpenFOAM/matrices/LduMatrix/LduMatrix/lduMatrix.C
src/OpenFOAM/matrices/LduMatrix/LduMatrix/lduMatrix.H
src/OpenFOAM/matrices/LduMatrix/LduMatrix/lduMatrixATmul.C
src/OpenFOAM/matrices/LduMatrix/LduMatrix/lduMatrixOperations.C
src/OpenFOAM/matrices/LduMatrix/LduMatrix/lduMatrixPreconditioner.C
src/OpenFOAM/matrices/LduMatrix/LduMatrix/lduMatrixSmoother.C
src/OpenFOAM/matrices/LduMatrix/LduMatrix/lduMatrixSolver.C
src/OpenFOAM/matrices/LduMatrix/LduMatrix/lduMatrixTemplates.C
src/OpenFOAM/matrices/LduMatrix/LduMatrix/lduMatrixUpdateMatrixInterfaces.C

I did the following after each config change:

rm -rf *
git reset --hard 
git status

The Git repository is git://github.com/OpenFOAM/OpenFOAM-2.3.x.git and the current operating system is MacOS X 10.9.5. Git version is 1.9.3. File system is HFS+ (case-insensitive).


Solution

  • Turns out there are files in the repository that exist in both uppercase and lowercase form, in the same directory. For example 'dictionary' and 'Dictionary'. The solution on the MacOS X side is to create a case-sensitive HFS+ disk image, mount that and then checkout the repository in the mounted path.

    Command used:

    hdiutil create -size 1g -fs "Case-sensitive Journaled HFS+" -volname "OpenFOAM Development" openfoam-development.dmg
    

    It would have probably been better to avoid the issue causing the problem, but I just need to accept this limitation.