2017-07-19 100 views
1

設置core.fileMode爲false爲什麼:爲什麼jgit默認

val git = Git 
    .cloneRepository() 
    .setURI(s"https://github.com/whatever/whatever.git") 
    .call() 

println(git.getRepository.getConfig.getBoolean("core", "fileMode", true)) 
// Prints false 

而如果我閱讀文檔: https://git-scm.com/docs/git-config#git-config-corefileMode

默認爲真(當沒有指定core.filemode被配置文件)。

那麼爲什麼JGit決定重寫core.filemode?

乾杯

回答

1

JGit不同設置FILEMODE在Windows和UNIX類操作系統。由於Windows沒有可執行的位,所以在這裏默認爲false。

+0

我在Linux上... – Joan