为什么jgit默认将core.fileMode设置为false

时间:2017-07-19 10:51:36

标签: 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

  

默认值为true(在配置文件中未指定core.filemode时)。

那么为什么JGit决定让我覆盖core.filemode?

干杯

2 个答案:

答案 0 :(得分:1)

JGit在Windows和类Unix操作系统上设置文件模式的方式不同。由于Windows没有可执行位,因此默认值为false。

答案 1 :(得分:0)

好吧,我提出了一个问题:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=519887

并提供了修复:
https://git.eclipse.org/r/101582