Git Difftool p4merge Diff出现意外提示



运行git difftool时,系统会提示我输入文件diff,即使我的.gitconfig文件中有prompt = false

来自.gitconfig的代码段

[diff]
tool = p4mergetool
renames = copies
mnemonicprefix = true
[difftool "p4mergetool"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "$LOCAL" "$REMOTE"
keepBackup = false
keepTemporaries = false
trustExitCode = false
prompt = false

我的.gitconfig条目是基于Ask Different交换上的这个答案。

macOS终端输出(bash(

$git difftool工厂测试HEAD--$(git difftools工厂测试头--仅限名称*.c*.h(
查看(1/13(:'factory_test/config/sl_spidrv_usart_spidrv_config.h'
启动'p4mergetool'[Y/n]?Y
查看(2/13(:'factory_test/app.c'
启动'p4mergetool'[Y/n]?

如何使提示抑制生效?

我的版本信息:

  • p4merge(修订版Helix Merge/MACOSX1015X86_64/2021.1/2085655(
  • git(git版本2.31.1(
  • macOS Catalina(10.15.7版(

以下是解决方案:

[diff]
tool = p4mergetool
[difftool]
prompt = false
[difftool "p4mergetool"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "$LOCAL" "$REMOTE"
keepBackup = false
keepTemporaries = false
trustExitCode = false

相关内容

  • 没有找到相关文章