John Keeping <j...@keeping.me.uk> writes:

> Actually, can we just change all of the above part of the loop to:
>
>       test "$tool" = defaults && continue
>
>       merge_tool_path=$(
>               setup_tool "$tool" >/dev/null 2>&1 &&
>               translate_merge_tool_path "$tool"
>       ) || continue

Meaning "setup_tool ought to know which mode we are in and should
fail if we are in merge mode and it does not support merging"?  That
line of reasoning makes tons of sense to me, compared to this script
implementing that logic for these scriptlets.

How/when does translate_merge_tool_path fail?

>
>> >            if type "$merge_tool_path" >/dev/null 2>&1
>> >            then
>> > -                  available="$available$i$LF"
>> > +                  available="$available$tool$LF"
>> >            else
>> > -                  unavailable="$unavailable$i$LF"
>> > +                  unavailable="$unavailable$tool$LF"
>> >            fi
>> >    done
>> --
>> To unsubscribe from this list: send the line "unsubscribe git" in
>> the body of a message to majord...@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to