When running git difftool
I am being prompted for file diff, even though I have prompt = false
in my .gitconfig file.
Snippet from .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
My .gitconfig entries were based on this answer on the Ask Different exchange.
macOS Terminal Output (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]?
How do I get the prompt suppression to take effect?
My version infos:
Here is the solution:
[diff]
tool = p4mergetool
[difftool]
prompt = false
[difftool "p4mergetool"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "$LOCAL" "$REMOTE"
keepBackup = false
keepTemporaries = false
trustExitCode = false