From: Eric Sunshine Date: Mon, 22 Apr 2019 07:07:25 GMT Subject: Re: [PATCH 2/5] mergetool: use get_merge_tool function Message-ID: In-Reply-To: <692875cf4baaeee8b47fd7e95d0b787d1a08f64e.1555880168.git.liu.denton@gmail.com> On Mon, Apr 22, 2019 at 1:07 AM Denton Liu wrote: > [...] > Rewrite `get_merge_tool` to return whether or not the tool was guessed > and make git-mergetool call this function instead of duplicating the > logic. Also, let `$GIT_MERGETOOL_GUI` be set to determine whether or not > the guitool will be selected. > > Signed-off-by: Denton Liu > --- > diff --git a/Documentation/git-mergetool--lib.txt b/Documentation/git-mergetool--lib.txt > @@ -28,7 +28,10 @@ to define the operation mode for the functions listed below. > get_merge_tool:: > - returns a merge tool. > + returns '$is_guessed:$merge_tool'. '$is_guessed' is 'true' if > + the tool was guessed, else 'false'. '$merge_tool' is the merge > + tool to use. '$GIT_MERGETOOL_GUI' may be set to 'true' to search > + for the appropriate guitool. What is the likelihood that code outside of our control is using this function? If there is such code, this backward-incompatible change will break that code. If the likelihood is excessively small, perhaps it is not worth worrying about, otherwise, perhaps this warrants a new function with a distinct name.