【问题标题】:Using inside repository path in git textconv在 git textconv 中使用内部存储库路径
【发布时间】:2015-02-27 01:37:45
【问题描述】:

我想在 git 中配置 textconv 以获得人类可读的 xml 差异。而且我想将转换器程序保留在 git 存储库中。但是 ${GIT_WORK_TREE} 似乎不起作用:

.git 属性

*.xts -text diff=XtsDiff

.git\config

[diff "XtsDiff"]
    textconv = ${GIT_WORK_TREE}/xmllint-1.0.exe
    cachetextconv = true

如何让 textconv 使用存储库中的路径?

【问题讨论】:

    标签: git path attributes config


    【解决方案1】:

    这种语法在带有 ConEmucmd.exegit-bash 的 Windows 上对我有用(我假设是 Linux):

    [diff "XtsDiff"]
        textconv = `git rev-parse --show-toplevel`/xmllint-1.0.exe
        cachetextconv = true
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-26
      • 2021-11-14
      • 2020-08-04
      • 1970-01-01
      • 2017-12-29
      • 1970-01-01
      相关资源
      最近更新 更多