Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove FFI diff implementation #706

Merged
merged 1 commit into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions doc/gitsigns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,6 @@ diff_opts *gitsigns-config-diff_opts*
• "histogram" histogram diff algorithm
• internal: boolean
Use Neovim's built in xdiff library for running diffs.

Note Neovim v0.5 uses LuaJIT's FFI interface, whereas v0.5+ uses
`vim.diff`.
• indent_heuristic: boolean
Use the indent heuristic for the internal
diff library.
Expand Down
6 changes: 0 additions & 6 deletions lua/gitsigns/config.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions lua/gitsigns/diff_int.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

145 changes: 0 additions & 145 deletions lua/gitsigns/diff_int/xdl_diff_ffi.lua

This file was deleted.

6 changes: 0 additions & 6 deletions teal/gitsigns/config.tl
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,6 @@ M.schema = {
elseif o == 'internal' then
if vim.diff then
r.internal = true
elseif jit and jit.os ~= "Windows" then
-- Use FFI
r.internal = true
end
elseif o == 'horizontal' then
r.vertical = false
Expand All @@ -414,9 +411,6 @@ M.schema = {
• "histogram" histogram diff algorithm
• internal: boolean
Use Neovim's built in xdiff library for running diffs.

Note Neovim v0.5 uses LuaJIT's FFI interface, whereas v0.5+ uses
`vim.diff`.
• indent_heuristic: boolean
Use the indent heuristic for the internal
diff library.
Expand Down
4 changes: 0 additions & 4 deletions teal/gitsigns/diff_int.tl
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ local run_diff_xdl_async = async.wrap(function(
end):queue(a, b, algorithm, indent_heuristic, linematch)
end, 6)

if not vim.diff then
run_diff_xdl = require('gitsigns.diff_int.xdl_diff_ffi')
end

M.run_diff = async.void(function(
fa: {string}, fb: {string},
diff_algo: string, indent_heuristic: boolean,
Expand Down
145 changes: 0 additions & 145 deletions teal/gitsigns/diff_int/xdl_diff_ffi.tl

This file was deleted.