Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 2/2] mergetools: fail if display needed but not present

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:25

Tim Henigan [off-list ref] writes:
Prior to this commit, if 'git mergetool' or 'git difftool' were run in a
terminal-only session, they might still try to open a tool that required
a windowed environment.
When you say "The command does X.  X is bad for such and such reasons.
Make it do Y instead, because it is nicer for such and such reasons.",
everybody would understand that the command does X without your patch.
Maybe it is just me, but I find the phrases like "Prior to this commit" or
"Currently" somewhat irritating.
This commit teaches 'git-mergetool--lib.sh' to test for the presence of
a display prior to opening tools that require one.
Hrm, why not make it more general, so that mergetool--lib does not have to
know anything about DISPLAY but allow the tool scripts to inspect their
environment and make their own decision, i.e. after loading the tool
scriptlet, the caller can call "can_run [--quiet]" and the scriptlet can
either return 0/1 and optionally issue the help message?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help