git-watchtower 1.9.10 → 1.9.11
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 +7 -1
- package/package.json +1 -1
package/bin/git-watchtower.js
CHANGED
|
@@ -732,6 +732,7 @@ const { ansi, box, truncate, sparkline: uiSparkline, visibleLength, stripAnsi, p
|
|
|
732
732
|
|
|
733
733
|
// Error detection utilities imported from src/utils/errors.js
|
|
734
734
|
const { ErrorHandler, isAuthError, isMergeConflict, isNetworkError } = require('../src/utils/errors');
|
|
735
|
+
const { Mutex } = require('../src/utils/async');
|
|
735
736
|
|
|
736
737
|
// Keyboard handling utilities imported from src/ui/keybindings.js
|
|
737
738
|
const { filterBranches } = require('../src/ui/keybindings');
|
|
@@ -1606,8 +1607,12 @@ async function stashAndRetry() {
|
|
|
1606
1607
|
// Polling
|
|
1607
1608
|
// ============================================================================
|
|
1608
1609
|
|
|
1610
|
+
const pollMutex = new Mutex();
|
|
1611
|
+
|
|
1609
1612
|
async function pollGitChanges() {
|
|
1610
|
-
if (
|
|
1613
|
+
// Skip if a poll is already in progress (don't queue)
|
|
1614
|
+
if (pollMutex.isLocked()) return;
|
|
1615
|
+
await pollMutex.acquire();
|
|
1611
1616
|
store.setState({ isPolling: true, pollingStatus: 'fetching' });
|
|
1612
1617
|
|
|
1613
1618
|
// Casino mode: start slot reels spinning (no sound - too annoying)
|
|
@@ -1966,6 +1971,7 @@ async function pollGitChanges() {
|
|
|
1966
1971
|
}
|
|
1967
1972
|
} finally {
|
|
1968
1973
|
store.setState({ isPolling: false });
|
|
1974
|
+
pollMutex.release();
|
|
1969
1975
|
render();
|
|
1970
1976
|
}
|
|
1971
1977
|
}
|
package/package.json
CHANGED