From d5aa53dcd3fdb7ea4b12f043b787a6419ab8eb84 Mon Sep 17 00:00:00 2001 From: Kyoichiro Yamada Date: Tue, 11 May 2021 17:55:41 +0900 Subject: create new action: git switch (#798) * create new action: git switch If the branch already exists in local, switch to that. If the branch is only in remote, create new branch tracking remote and switch to new one. * fix a point of review * fix a point of review: map to git-switch action * Revert "fix a point of review" This reverts commit 017ce424a3adfe1b3712a421385cfc3f4258a0fb. * undocument header comment --- lua/telescope/builtin/git.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lua/telescope/builtin/git.lua') diff --git a/lua/telescope/builtin/git.lua b/lua/telescope/builtin/git.lua index 77bacd0..ae03019 100644 --- a/lua/telescope/builtin/git.lua +++ b/lua/telescope/builtin/git.lua @@ -199,9 +199,11 @@ git.branches = function(opts) map('i', '', actions.git_create_branch) map('n', '', actions.git_create_branch) + map('i', '', actions.git_switch_branch) + map('n', '', actions.git_switch_branch) + map('i', '', actions.git_delete_branch) map('n', '', actions.git_delete_branch) - return true end }):find() -- cgit v1.2.3