From 95264ada7922318f723b74457f3507a9c535ecb4 Mon Sep 17 00:00:00 2001 From: JINNOUCHI Yasushi Date: Tue, 12 Jan 2021 17:06:16 +0900 Subject: [PATCH] fix: git_branch only remove remotes/origin part (#423) --- lua/telescope/builtin/git.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telescope/builtin/git.lua b/lua/telescope/builtin/git.lua index 309f6e2..c2d31c6 100644 --- a/lua/telescope/builtin/git.lua +++ b/lua/telescope/builtin/git.lua @@ -74,7 +74,7 @@ git.branches = function(opts) for _, v in ipairs(output) do if not string.match(v, 'HEAD') and v ~= '' then v = string.gsub(v, '.* ', '') - v = string.gsub(v, '^remotes/.*/', '') + v = string.gsub(v, '^remotes/[^/]*/', '') tmp_results[v] = true end end