git-watchtower 1.9.12 → 1.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/git-watchtower.js +8 -4
- package/package.json +1 -1
package/bin/git-watchtower.js
CHANGED
|
@@ -1746,11 +1746,15 @@ async function pollGitChanges() {
|
|
|
1746
1746
|
previousBranchStates.set(branch.name, branch.commit);
|
|
1747
1747
|
}
|
|
1748
1748
|
|
|
1749
|
-
// Remove stale entries from
|
|
1749
|
+
// Remove stale entries from caches for branches
|
|
1750
1750
|
// that no longer exist in the current poll results
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1751
|
+
const staleCaches = [previousBranchStates, prInfoCache, store.get('sparklineCache'), store.get('aheadBehindCache')];
|
|
1752
|
+
for (const cache of staleCaches) {
|
|
1753
|
+
if (!cache) continue;
|
|
1754
|
+
for (const name of cache.keys()) {
|
|
1755
|
+
if (!activeBranchNames.has(name)) {
|
|
1756
|
+
cache.delete(name);
|
|
1757
|
+
}
|
|
1754
1758
|
}
|
|
1755
1759
|
}
|
|
1756
1760
|
|
package/package.json
CHANGED