Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to suppress confirmation "Launch '$difftool' [Y/n]:" iff (if and only if) a specific file is passed to git difftool? [duplicate]

Tags:

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.

like image 970
Kalle Richter Avatar asked Nov 04 '14 18:11

Kalle Richter


People also ask

What is the command to turn off Diff tool prompting?

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

How do I start git Difftool?

Instead of running one of the known diff tools, git difftool can be customized to run an alternative program by specifying the command line to invoke in a configuration variable difftool. <tool>. cmd . When git difftool is invoked with this tool (either through the -t or --tool option or the diff.


1 Answers

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?

like image 149
Ajay Avatar answered Sep 28 '22 07:09

Ajay