Is it possible to set git core.precomposeunicode = true globally?

We configure git 1.8 in a mixed environment (OSX, Linux, Windows), and there are filenames that use non-English characters. I read that core.precomposeunicode must be set to true on OSX systems.

We do not care about backward compatibility. We are interested in making everything simple for developers. We better not explain the git configuration.

So: is it safe to set this flag globally (on a central git server)? Will this ensure the coherence we need? Is there any reason not to?

+4
source share
1 answer

No, that will not work. There is no central git server in a distributed version control system, at least not in the technical sense.

Each developer has his own repository, which he checks for changes. When these changes are transferred to the repository that you declare central, the data is not processed again.

You will need to install this configuration in each local repository.
Unfortunately, there is no alternative with .gitattributes either.

Local options for a specific repository, which will then be cloned by the developers, are also not an option. The following simple experiment shows this:

 d:\Temp\Origin>git init Initialized empty Git repository in d:/Temp/Origin/.git/ d:\Temp\Origin>git config --local --add core.autocrlf input d:\Temp\Origin>git config --local --list core.repositoryformatversion=0 core.filemode=false core.bare=false core.logallrefupdates=true core.symlinks=false core.ignorecase=true core.hidedotfiles=dotGitOnly core.autocrlf=input d:\Temp\Origin>cd .. d:\Temp>git clone d:\Temp\Origin Developer Cloning into 'Developer'... warning: You appear to have cloned an empty repository. done. d:\Temp>cd Developer d:\Temp\Developer>git config --local --list core.repositoryformatversion=0 core.filemode=false core.bare=false core.logallrefupdates=true core.symlinks=false core.ignorecase=true core.hidedotfiles=dotGitOnly remote.origin.url=d:\Temp\Origin remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.master.remote=origin branch.master.merge=refs/heads/master 

Note how calling git config --local --list in Origin lists core.autocrlf=input , but the same command doesn’t exist in Developer , although we just cloned Developer from Origin .
This indicates that local storage values ​​are not cloned.

+3
source

All Articles