Skip to content

Commit

Permalink
Comment unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
fgr1986 committed Dec 7, 2024
1 parent 07c6249 commit dc95d9f
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions lua/lualine/extensions/git_diffview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,16 @@ local function get_git_branch()
return branch ~= "" and branch or "HEAD"
end

local function is_remote_branch(ref)
local handle = io.popen(string.format("git branch -r --contains %s 2>/dev/null", ref))
if not handle then
return false
end
local remote = handle:read("*a"):match("%S+")
handle:close()
return remote and remote or false
end
-- Optional
-- local function is_remote_branch(ref)
-- local handle = io.popen(string.format("git branch -r --contains %s 2>/dev/null", ref))
-- if not handle then
-- return false
-- end
-- local remote = handle:read("*a"):match("%S+")
-- handle:close()
-- return remote and remote or false
-- end

local function get_all_branches_pointing_to(commit)
local handle = io.popen(string.format("git branch -a --points-at %s 2>/dev/null", commit))
Expand Down Expand Up @@ -292,13 +293,16 @@ M.inactive_winbar = {
-- Restrict to Diffview buffers
-- M.buftypes = {''}
M.filetypes = {
--Null
'null',

-- Programming Languages
'lua', 'python', 'javascript', 'typescript', 'html', 'css', 'json', 'yaml', 'yml',
'markdown', 'md', 'c', 'cpp', 'cxx', 'h', 'hpp', 'java', 'ruby', 'go', 'php', 'rust',
'sh', 'bash', 'vim', 'toml',

-- Configuration & Build Files
'gitcommit', 'gitrebase', 'make', 'dockerfile', 'env', 'ini',
'gitcommit', 'gitrebase', 'make', 'dockerfile', 'env', 'ini', 'conf',

-- Markup and Documentation
'xml', 'tex', 'latex', 'asciidoc', 'rst',
Expand Down

0 comments on commit dc95d9f

Please sign in to comment.