克隆此回购协议后:
https://github.com/OpenFOAM/OpenFOAM-3.0.x
我马上就要做出改变了。
我试图用在textmode
文件上更改crlfauto
和./git/config
的通用解决方案来修复它。我也试过.gitattributes
文件。然而,这不是一个行结束的问题。我的代码有实际的变化。
以下是我的程序和输出:
cruz@MacBook-Air-de-Luis ~/dev git clone https://github.com/luiscruz/OpenFOAM-3.0.x.git
Cloning into 'OpenFOAM-3.0.x'...
remote: Counting objects: 49097, done.
remote: Total 49097 (delta 0), reused 0 (delta 0), pack-reused 49097
Receiving objects: 100% (49097/49097), 59.70 MiB | 2.29 MiB/s, done.
Resolving deltas: 100% (30768/30768), done.
Checking connectivity... done.
Checking out files: 100% (13863/13863), done.
cruz@MacBook-Air-de-Luis ~/dev cd OpenFOAM-3.0.x
cruz@MacBook-Air-de-Luis ~/dev/OpenFOAM-3.0.x 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: applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C
modified: applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.H
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
modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixPreconditioner.C
modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSmoother.C
modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C
modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C
modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/SolverPerformance.C
modified: src/OpenFOAM/matrices/LduMatrix/LduMatrix/SolverPerformance.H
modified: src/OpenFOAM/matrices/LduMatrix/Preconditioners/DiagonalPreconditioner/DiagonalPreconditioner.C
modified: src/OpenFOAM/matrices/LduMatrix/Preconditioners/DiagonalPreconditioner/DiagonalPreconditioner.H
modified: src/OpenFOAM/matrices/LduMatrix/Preconditioners/NoPreconditioner/NoPreconditioner.C
modified: src/OpenFOAM/matrices/LduMatrix/Preconditioners/NoPreconditioner/NoPreconditioner.H
modified: src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.C
modified: src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.H
modified: src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.C
modified: src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.H
modified: src/OpenFOAM/meshes/MeshObject/MeshObject.C
modified: src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H
modified: src/OpenFOAM/meshes/primitiveShapes/objectHit/PointHit.H
modified: src/OpenFOAM/meshes/primitiveShapes/objectHit/PointIndexHit.H
modified: src/finiteVolume/finiteVolume/fvc/fvcDDt.C
modified: src/finiteVolume/finiteVolume/fvc/fvcDDt.H
modified: src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C
modified: src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.H
modified: src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrads.C
modified: src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C
modified: src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.H
modified: src/fvOptions/constraints/general/explicitSetValue/ExplicitSetValue.C
modified: src/fvOptions/sources/general/codedSource/CodedSource.C
modified: src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C
modified: tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/B
no changes added to commit (use "git add" and/or "git commit -a")
cruz@MacBook-Air-de-Luis ~/dev/OpenFOAM-3.0.x master ●
我甚至尝试过提交这些更改,但它不起作用。
git version 2.10.1
Mac OS X 10.10.5
我的Git配置:
git config -l
core.excludesfile=~/.gitignore
core.legacyheaders=false
core.quotepath=false
core.pager=less
mergetool.keepbackup=true
push.default=simple
color.ui=auto
color.interactive=auto
repack.usedeltabaseoffset=true
alias.s=status
alias.a=!git add . && git status
alias.au=!git add -u . && git status
alias.aa=!git add . && git add -u . && git status
alias.c=commit
alias.cm=commit -m
alias.ca=commit --amend
alias.ac=!git add . && git commit
alias.acm=!git add . && git commit -m
alias.l=log --graph --all --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
alias.ll=log --stat --abbrev-commit
alias.lg=log --color --graph --pretty=format:'%C(bold white)%h%Creset -%C(bold green)%d%Creset %s %C(bold green)(%cr)%Creset %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
alias.llg=log --color --graph --pretty=format:'%C(bold white)%H %d%Creset%n%s%n%+b%C(bold blue)%an <%ae>%Creset %C(bold green)%cr (%ci)' --abbrev-commit
alias.d=diff
alias.master=checkout master
alias.spull=svn rebase
alias.spush=svn dcommit
alias.alias=!git config --list | grep 'alias\.' | sed 's/alias\.\([^=]*\)=\(.*\)/\1\ => \2/' | sort
include.path=~/.gitcinclude
include.path=.githubconfig
include.path=.gitcredential
diff.exif.textconv=exif
credential.helper=osxkeychain
user.name=Luis Cruz
[email protected]
credential.helper=osxkeychain
push.default=simple
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
core.autocrlf=true
remote.origin.url=https://github.com/luiscruz/OpenFOAM-3.0.x.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
Git Diff摘录:
-#include "InterfaceCompositionModel.H"
+#include "interfaceCompositionModel.H"
#include "phaseModel.H"
#include "phasePair.H"
-#include "pureMixture.H"
-#include "multiComponentMixture.H"
-#include "rhoThermo.H"
-// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
我邀请您克隆回购协议:
git clone https://github.com/luiscruz/OpenFOAM-3.0.x.git
最佳答案
比较https://github.com/OpenFOAM/OpenFOAM-3.0.x/blob/master/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H和https://github.com/OpenFOAM/OpenFOAM-3.0.x/blob/master/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.H
这两个文件的路径只有大小写不同。你的macosx很可能有一个不区分大小写的文件系统,把它们混在一起。
从他们的样子来看,我会说这不是故意的,而是因为一些错误。有一些选项可以尝试从中恢复,但我建议首先检查官方存储库:http://www.openfoam.com/code/repositories.php并查看是否有相同的问题。