Git Difftool p4merge 在 Diff 上出现意外提示

Git Difftool p4merge Unexpected Prompt on Diff

当 运行 git difftool 提示我进行文件差异时,即使我的 .git 配置文件中有 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

我的 .git 配置条目基于 this answer on the Ask Different exchange.

macOS 终端输出 (bash)

$ git difftool factory-test HEAD -- $(git difftool factory-test HEAD --name-only *.c *.h)
Viewing (1/13): 'factory_test/config/sl_spidrv_usart_spidrv_config.h'
Launch 'p4mergetool' [Y/n]? Y
Viewing (2/13): 'factory_test/app.c'
Launch 'p4mergetool' [Y/n]?

如何让提示抑制生效?

我的版本信息:

解决方法如下:

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