From 0ccff549338468711753e8eb58c2ebe4ae46348b Mon Sep 17 00:00:00 2001 From: Harrison Cramer Date: Thu, 17 Aug 2023 16:24:15 -0400 Subject: [PATCH] Remove unused branch_exists function --- lua/gitlab/utils/init.lua | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lua/gitlab/utils/init.lua b/lua/gitlab/utils/init.lua index 0854a18..fc1bdce 100644 --- a/lua/gitlab/utils/init.lua +++ b/lua/gitlab/utils/init.lua @@ -9,20 +9,6 @@ local function get_git_root() end end -local branch_exists = function(b) - local is_git_branch = io.popen("git rev-parse --is-inside-work-tree 2>/dev/null"):read("*a") - if is_git_branch == "true\n" then - for line in io.popen("git branch 2>/dev/null"):lines() do - line = line:gsub("%s+", "") - if line == b then - return true - end - end - end - return false -end - - local function get_relative_file_path() local git_root = get_git_root() if git_root ~= nil then @@ -283,7 +269,6 @@ M.create_popup_state = create_popup_state M.exit = exit M.read_file = read_file M.split_diff_view_filename = split_diff_view_filename -M.branch_exists = branch_exists M.current_file_path = current_file_path M.P = P return M