Skip to content

Commit

Permalink
feat!: remove support for yadm
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis6991 committed Jun 19, 2024
1 parent 3d7e49c commit 61f5b64
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 56 deletions.
12 changes: 0 additions & 12 deletions doc/gitsigns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -936,18 +936,6 @@ trouble *gitsigns-config-trouble*
When using setqflist() or setloclist(), open Trouble instead of the
quickfix/location list window.

yadm *gitsigns-config-yadm*
DEPRECATED
Please use |gitsigns-config-on_attach_pre| instead

Type: `table`
Default: >
`{
enable = false
}`
<
yadm configuration.

word_diff *gitsigns-config-word_diff*
Type: `boolean`, Default: `false`

Expand Down
13 changes: 0 additions & 13 deletions lua/gitsigns/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
--- @field preview_config table<string,any>
--- @field auto_attach boolean
--- @field attach_to_untracked boolean
--- @field yadm { enable: boolean }
--- @field worktrees {toplevel: string, gitdir: string}[]
--- @field word_diff boolean
--- @field trouble boolean
Expand All @@ -111,7 +110,6 @@ local M = {
watch_gitdir = {},
current_line_blame_formatter_opts = {},
current_line_blame_opts = {},
yadm = {},
Worktree = {},
},
}
Expand Down Expand Up @@ -810,17 +808,6 @@ M.schema = {
]],
},

yadm = {
type = 'table',
deprecated = {
message = 'Please use |gitsigns-config-on_attach_pre| instead',
},
default = { enable = false },
description = [[
yadm configuration.
]],
},

_git_version = {
type = 'string',
default = 'auto',
Expand Down
31 changes: 0 additions & 31 deletions lua/gitsigns/git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -327,35 +327,6 @@ function Repo:update_abbrev_head()
self.abbrev_head = M.get_repo_info(self.toplevel).abbrev_head
end

--- @private
--- @param dir string
--- @param gitdir? string
--- @param toplevel? string
function Repo:try_yadm(dir, gitdir, toplevel)
if not config.yadm.enable or self.gitdir then
return
end

local home = os.getenv('HOME')

if not home or not vim.startswith(dir, home) then
return
end

if #git_command({ 'ls-files', dir }, { command = 'yadm' }) == 0 then
return
end

M.get_repo_info(dir, 'yadm', gitdir, toplevel)
local yadm_info = M.get_repo_info(dir, 'yadm', gitdir, toplevel)
for k, v in
pairs(yadm_info --[[@as table<string,any>]])
do
---@diagnostic disable-next-line:no-unknown
self[k] = v
end
end

--- @async
--- @param dir string
--- @param gitdir? string
Expand All @@ -373,8 +344,6 @@ function Repo.new(dir, gitdir, toplevel)
self[k] = v
end

self:try_yadm(dir, gitdir, toplevel)

return self
end

Expand Down

1 comment on commit 61f5b64

@rj1
Copy link

@rj1 rj1 commented on 61f5b64 Jun 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:(

Please sign in to comment.