Re: [PATCH 7/7] mergetool--lib: Improve show_tool_help() output
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 25, 2013, 20:16 UTC
- Message-ID
- <7vpq0t2f2t.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130125200807.GB7498@serenity.lan>
John Keeping <john@keeping.me.uk> writes:
Show 8 quoted lines
> 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?
Show 14 quoted lines
> >> > 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 majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html