feat: 提交详情能看 diff,也能丢给 AI 审这一次改动。文件检查可单独排除路径,TODO 只认大写,避免把 todo 表和模块当成待办标记。
热力图按容器宽度铺满一年,不再横向滚动。托盘右键换成可换皮肤的弹层;更新下载显示进度,退出后再由脚本拉起安装器,避免还占着 exe。
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
gitignore "github.com/sabhiram/go-gitignore"
|
||||
"io/fs"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
@@ -23,12 +24,22 @@ type Scanner struct{}
|
||||
func MatchExcludedPattern(pattern, rel string) bool {
|
||||
pattern = filepath.ToSlash(strings.TrimSpace(pattern))
|
||||
rel = filepath.ToSlash(rel)
|
||||
if pattern == "" || rel == "" {
|
||||
return false
|
||||
}
|
||||
if strings.Contains(pattern, "/") {
|
||||
ok, _ := filepath.Match(filepath.FromSlash(pattern), filepath.FromSlash(rel))
|
||||
pattern = strings.TrimSuffix(pattern, "/")
|
||||
if ok, _ := path.Match(pattern, rel); ok {
|
||||
return true
|
||||
}
|
||||
if strings.HasPrefix(rel, pattern+"/") {
|
||||
return true
|
||||
}
|
||||
ok, _ := path.Match(pattern+"/*", rel)
|
||||
return ok
|
||||
}
|
||||
for _, part := range strings.Split(rel, "/") {
|
||||
if ok, _ := filepath.Match(pattern, part); ok {
|
||||
if ok, _ := path.Match(pattern, part); ok {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user