Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lua/git-dev/session.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function Session:find(filters)
filter.type == "equal"
and not vim.deep_equal(repo_ctx[filter.name], filter.value)
or filter.type == "contains"
and not repo_ctx[filter.name]:find(filter.value)
and not repo_ctx[filter.name]:find(filter.value, 1, true)
then
match = false
break
Expand Down
5 changes: 5 additions & 0 deletions tests/session_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ local function gen_repos()
foo = "gas",
foo2 = "gas2",
},
{
foo = "test-hyphen",
foo2 = "test-hyphen2",
},
}
for i, repo in ipairs(repos) do
repo.repo_dir = i
Expand All @@ -37,6 +41,7 @@ local filters_to_nr = {
},
1,
},
{ { { name = "foo", value = "test-h", type = "contains" } }, 1 },
}

local function test_sanity()
Expand Down