Re: [PATCH v2] mergetools: add support for DeltaWalker
- From
David Aguilar <davvid@gmail.com>
- Date
- Mar 3, 2012, 22:00 UTC
- Message-ID
- <CAJDDKr4q7gmFeHuGM5hFruduHw-3mGa+CMU=U6X0jjXUsJLsvw@mail.gmail.com>
- In-Reply-To
- <7vaa3ybpat.fsf@alter.siamese.dyndns.org>
On Fri, Mar 2, 2012 at 2:39 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> Tim Henigan <tim.henigan@gmail.com> writes: > >> mergetools/DeltaWalker | 12 ++++++++++++ > > How does an end user choose to use this backend? Perhaps like this? > > $ git mergetool --tool=DeltaWalker > > All the other files in mergetools/ are in lower case, and I _strongly_ > prefer to have this new file also be in lower case.
I agree.
Show 24 quoted lines
> Such a change may mean you may have to override translate_merge_tool_path
> in this file, like some other backends seem to do.
>
>> 1 file changed, 12 insertions(+)
>> create mode 100644 mergetools/DeltaWalker
>>
>> diff --git a/mergetools/DeltaWalker b/mergetools/DeltaWalker
>> new file mode 100644
>> index 0000000..b9e6618
>> --- /dev/null
>> +++ b/mergetools/DeltaWalker
>> @@ -0,0 +1,12 @@
>> +diff_cmd () {
>> + "$merge_tool_path" "$LOCAL" "$REMOTE" >/dev/null 2>&1
>> +}
>> +
>> +merge_cmd () {
>> + if $base_present
>> + then
>> + "$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" -merged="$PWD/$MERGED"
>> + else
>> + "$merge_tool_path" "$LOCAL" "$REMOTE" -merged="$PWD/$MERGED"
>> + fi >/dev/null 2>&1
>> +}Is the $PWD/ prefix strictly needed? The rest of the mergetools use $MERGED as-is. Does it work without it?
-- David