How do I get the real config value in Git?

前端 未结 1 909
隐瞒了意图╮
隐瞒了意图╮ 2021-01-04 01:42

It seems that git config only returns value that I explicitly set and doesn\'t aware of the default values. For example when I run git config commit.statu

相关标签:
1条回答
  • 2021-01-04 02:40

    Unfortunately, I don't think this is possible. Perhaps someone more familiar with the git source code will correct me, but I think that the default values are typically hard-coded in the source files and overridden by the config variables. For example, the default for gc.pruneExpire is defined here and potentially overridden here when the configuration is checked. I don't think there's any mechanism for git config to get at that default value.

    0 讨论(0)
提交回复
热议问题