24

When merging branches or reviewing all changes against a revision with git difftool it might make sense to ask Launch '$difftool' [Y/n]: before every invokation of the tool in order to make the long chain of invokations interruptible with SIGINT. When a specific file is passed as argument it does not, AFAIK. How to suppress that question only in the latter case (because it makes sense to ask it the former)?

I'm using 2.1.0 on Ubuntu 14.10.

EDIT: After seeing Why does "git difftool" not open the tool directly? I modify the question in order to figure out how to deal with the fact that it makes sense to ask if there's more than one file to diff.

Community
  • 1
  • 1
Kalle Richter
  • 8,008
  • 26
  • 77
  • 177

1 Answers1

62

I found the below from Stack Overflow itself:

 man git-difftool

OPTIONS
   -y, --no-prompt
       Do not prompt before launching a diff tool.

Or set it in the global configuration itself:

git config --global --add difftool.prompt false

Why does "git difftool" not open the tool directly?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ajay
  • 2,976
  • 2
  • 28
  • 35