git-watchtower 1.9.19 → 1.9.20
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 +4 -2
- package/package.json +1 -1
package/bin/git-watchtower.js
CHANGED
|
@@ -1413,9 +1413,11 @@ async function switchToBranch(branchName, recordHistory = true) {
|
|
|
1413
1413
|
store.setState({ currentBranch: safeBranchName, isDetachedHead: false });
|
|
1414
1414
|
|
|
1415
1415
|
// Clear NEW flag when branch becomes current
|
|
1416
|
-
const
|
|
1416
|
+
const branches = store.get('branches');
|
|
1417
|
+
const branchInfo = branches.find(b => b.name === safeBranchName);
|
|
1417
1418
|
if (branchInfo && branchInfo.isNew) {
|
|
1418
1419
|
branchInfo.isNew = false;
|
|
1420
|
+
store.setState({ branches: [...branches] });
|
|
1419
1421
|
}
|
|
1420
1422
|
|
|
1421
1423
|
// Record in history (for undo)
|
|
@@ -1870,10 +1872,10 @@ async function pollGitChanges() {
|
|
|
1870
1872
|
await execGit(['pull', REMOTE_NAME, autoPullBranchName], { cwd: PROJECT_ROOT, timeout: 60000 });
|
|
1871
1873
|
addLog(`Pulled successfully from ${autoPullBranchName}`, 'success');
|
|
1872
1874
|
currentInfo.hasUpdates = false;
|
|
1873
|
-
store.setState({ hasMergeConflict: false });
|
|
1874
1875
|
// Update the stored commit to the new one
|
|
1875
1876
|
const newCommit = await execGit(['rev-parse', '--short', 'HEAD'], { cwd: PROJECT_ROOT });
|
|
1876
1877
|
currentInfo.commit = newCommit.stdout.trim();
|
|
1878
|
+
store.setState({ hasMergeConflict: false, branches: [...store.get('branches')] });
|
|
1877
1879
|
previousBranchStates.set(autoPullBranchName, newCommit.stdout.trim());
|
|
1878
1880
|
// Reload browsers
|
|
1879
1881
|
notifyClients();
|
package/package.json
CHANGED