fix(getUncommittedDiff): Avoid false-positive diffs in getUncommittedDiff by detecting symlinked directories and skipping identical files

This commit is contained in:
2025-11-04 03:40:49 +00:00
parent 238dd152ba
commit 734137e7b5
4 changed files with 72 additions and 2 deletions

View File

@@ -1,5 +1,14 @@
# Changelog
## 2025-11-04 - 3.3.1 - fix(getUncommittedDiff)
Avoid false-positive diffs in getUncommittedDiff by detecting symlinked directories and skipping identical files
- Detect files reported as "added" that are actually inside symlinked directories (catch isomorphic-git error: "anticipated to be a tree but it is a blob") and skip them to avoid huge false-positive lists.
- Compare HEAD and workdir file contents and skip entries where contents are identical to filter out permission/timestamp/line-ending false positives.
- Add glob support for excludeFiles via minimatch and skip exact or glob-matching paths during diff collection.
- Files changed: ts/smartgit.classes.gitrepo.ts (symlink detection, content comparison, diff filtering), ts/smartgit.plugins.ts (export minimatch), readme.hints.md (notes).
- Observed impact: false positives reduced dramatically in reported case (1,883 → 2 files); output size reduced from ~59 MB → ~2 KB.
## 2025-11-04 - 3.3.0 - feat(GitRepo)
Add glob-pattern exclusions for getUncommittedDiff and add minimatch; bump dependencies