Re: [PATCH] mergetool--lib: Allow custom commands to override built-ins
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 26, 2012, 14:06 UTC
- Message-ID
- <7vtxukubds.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CALkWK0naJt840LfMNBM7EtdyLE5nmJeAsxG-Wttj8c84O5X7jA@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 17 quoted lines
> Hi David,
>
> David Aguilar wrote:
>> diff_cmd () {
>> - merge_tool_cmd="$(get_merge_tool_cmd "$1")"
>> - if test -z "$merge_tool_cmd"
>> - then
>> - status=1
>> - break
>> - fi
>> - ( eval $merge_tool_cmd )
>> - status=$?
>> + status=1
>> return $status
>> }
>
> Nit: Why not return 1, instead of setting $status and returning it?Perhaps because the caller "run_merge_tool" pays attention to $status that is a global variable?
Have you traced the call chain?