Skip to content

Commit de152be

Browse files
Copilotalexr00
andauthored
Improve comment clarity for ancestor directory update loop
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/vscode-pull-request-github/sessions/0fafc95a-8baa-49ec-8f27-602e4bcf370a
1 parent 5d83474 commit de152be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/view/treeNodes/treeUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ export namespace TreeUtils {
4646
}
4747
}
4848

49-
// Eagerly update ancestor directory checkbox states from bottom to top.
50-
// With manageCheckboxStateManually, we must set directory states before refresh
51-
// rather than relying solely on getTreeItem(), since VS Code may not apply
52-
// checkboxState changes returned from getTreeItem() during a refresh.
49+
// Eagerly update ancestor directory checkbox states by walking from each
50+
// affected file up through its parent directories. With manageCheckboxStateManually,
51+
// we must set directory states before refresh rather than relying solely on
52+
// getTreeItem(), since VS Code may not apply checkboxState changes during a refresh.
5353
const allAffected = [...checkedNodes, ...uncheckedNodes];
5454
for (const node of allAffected) {
5555
let parent = node.getParent();

0 commit comments

Comments
 (0)