diff --git a/docs/changelog.rst b/docs/changelog.rst index a99116fa3..07906415b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -50,6 +50,8 @@ Detailed list of changes - hints kitten: Fix a regression in 0.28.0 that broke using sub-groups in regexp captures (:iss:`6228`) +- diff kitten: Fix a regression in 0.28.0 that broke using relative paths as arguments to the kitten (:iss:`6325`) + 0.28.1 [2023-04-21] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kittens/diff/collect.go b/kittens/diff/collect.go index 5e5dd84aa..99c42fe50 100644 --- a/kittens/diff/collect.go +++ b/kittens/diff/collect.go @@ -258,6 +258,10 @@ func resolve_remote_name(path, defval string) string { } func walk(base string, patterns []string, names *utils.Set[string], pmap, path_name_map map[string]string) error { + base, err := filepath.Abs(base) + if err != nil { + return err + } return filepath.WalkDir(base, func(path string, d fs.DirEntry, err error) error { is_allowed := allowed(path, patterns...) if !is_allowed {