refactor(git): rework log_view, drop URI scheme
This commit is contained in:
@@ -338,10 +338,10 @@ t.test("<leader>gl log buffer refills after jumping back", function()
|
||||
h.git(dir, "commit", "-q", "-m", "second")
|
||||
|
||||
require("git.log_view").open({ max_count = 1000 })
|
||||
wait_buf_populated("^gitlog://")
|
||||
wait_buf_populated("/GitLog$")
|
||||
local log_buf = vim.api.nvim_get_current_buf()
|
||||
local log_win = vim.api.nvim_get_current_win()
|
||||
t.truthy(vim.api.nvim_buf_get_name(log_buf):match("^gitlog://"))
|
||||
t.truthy(vim.api.nvim_buf_get_name(log_buf):match("/GitLog$"))
|
||||
local initial_lines = #vim.api.nvim_buf_get_lines(log_buf, 0, -1, false)
|
||||
t.truthy(initial_lines >= 2)
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@ t.test(
|
||||
end
|
||||
)
|
||||
|
||||
t.test("sidebar buffer is named <worktree>/Git Status", function()
|
||||
t.test("sidebar buffer is named <worktree>/GitStatus", function()
|
||||
local repo = h.make_repo({ ["foo.txt"] = "x\n" })
|
||||
vim.cmd("cd " .. repo)
|
||||
require("git.status_view").open({ placement = "sidebar" })
|
||||
@@ -325,8 +325,8 @@ t.test("sidebar buffer is named <worktree>/Git Status", function()
|
||||
assert(buf, "sidebar buffer should exist")
|
||||
t.eq(
|
||||
vim.api.nvim_buf_get_name(buf),
|
||||
r.worktree .. "/Git Status",
|
||||
"buffer name should be <worktree>/Git Status"
|
||||
r.worktree .. "/GitStatus",
|
||||
"buffer name should be <worktree>/GitStatus"
|
||||
)
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user