Compare commits

..

No commits in common. "1aacc80e6e4930fc08c36d079e9029e1ce280c14" and "288e8803b394f20702d8f462364484d75bf247a1" have entirely different histories.

3 changed files with 108 additions and 124 deletions

3
.gitmodules vendored
View File

@ -97,6 +97,3 @@
[submodule "pack/plugins/start/vim-quickhl"]
path = pack/plugins/start/vim-quickhl
url = https://github.com/t9md/vim-quickhl.git
[submodule "pack/plugins/start/vim-jdaddy"]
path = pack/plugins/start/vim-jdaddy
url = https://github.com/tpope/vim-jdaddy.git

View File

@ -5,10 +5,6 @@ end
local function get_branch_parent()
local author = invoke({'git', 'config', 'user.name'})
if #author == 0 then
print('User name is not set')
return
end
local hash = invoke{
'git',
@ -26,13 +22,6 @@ local function get_branch_parent()
end
end
local function edit_git_paths(names)
local root_dir = invoke({'git', 'rev-parse', '--show-toplevel'})
for name in string.gmatch(names, '[^\r\n]+') do
vim.cmd(string.format('e %s/%s', root_dir, name))
end
end
-- UnAlign
vim.api.nvim_create_user_command(
'UnAlign',
@ -42,22 +31,21 @@ vim.api.nvim_create_user_command(
{range = '%'}
)
-- Conflicts
vim.api.nvim_create_user_command(
'Conflicts',
function(ctx)
edit_git_paths(invoke({'git', 'diff', '--name-only', '--diff-filter=U'}))
end,
{}
)
-- TopicEdit
vim.api.nvim_create_user_command(
'TopicEdit',
function(ctx)
local hash = get_branch_parent()
if hash then
edit_git_paths(invoke({'git', 'diff', '--name-only', hash}))
local names = invoke({'git', 'diff', '--name-only', hash})
if #names == 0 then
print('No files changed since previous author')
else
local root_dir = invoke({'git', 'rev-parse', '--show-toplevel'})
for name in string.gmatch(names, '[^\r\n]+') do
vim.cmd(string.format('e %s/%s', root_dir, name))
end
end
end
end,
{}

@ -1 +0,0 @@
Subproject commit 23b67752cb869dd9c8f3109173b69aa96a1f3acf