Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 29 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@
"title": "Hide checkboxes",
"category": "Git Tree Compare"
},
{
"command": "gitTreeCompare.showDiffDetails",
"title": "Show hunks",
"category": "Git Tree Compare"
},
{
"command": "gitTreeCompare.hideDiffDetails",
"title": "Hide hunks",
"category": "Git Tree Compare"
},
{
"command": "gitTreeCompare.viewAsList",
"title": "View as List",
Expand Down Expand Up @@ -298,22 +308,32 @@
{
"command": "gitTreeCompare.switchToFullDiff",
"when": "view == gitTreeCompare && config.gitTreeCompare.diffMode == merge",
"group": "3_options"
"group": "3_options@3"
},
{
"command": "gitTreeCompare.switchToMergeDiff",
"when": "view == gitTreeCompare && config.gitTreeCompare.diffMode == full",
"group": "3_options"
"group": "3_options@3"
},
{
"command": "gitTreeCompare.showCheckboxes",
"when": "view == gitTreeCompare && !config.gitTreeCompare.showCheckboxes",
"group": "3_options"
"group": "3_options@1"
},
{
"command": "gitTreeCompare.hideCheckboxes",
"when": "view == gitTreeCompare && config.gitTreeCompare.showCheckboxes",
"group": "3_options"
"group": "3_options@1"
},
{
"command": "gitTreeCompare.showDiffDetails",
"when": "view == gitTreeCompare && !config.gitTreeCompare.showDiffDetails",
"group": "3_options@2"
},
{
"command": "gitTreeCompare.hideDiffDetails",
"when": "view == gitTreeCompare && config.gitTreeCompare.showDiffDetails",
"group": "3_options@2"
},
{
"command": "gitTreeCompare.viewAsList",
Expand Down Expand Up @@ -553,6 +573,11 @@
"description": "Whether to show checkboxes such that files or folders can be ticked off, for example when reviewing.",
"default": false
},
"gitTreeCompare.showDiffDetails": {
"type": "boolean",
"description": "Whether to show diff details (hunks) for each file. When enabled, files can be expanded to view individual changes.",
"default": true
},
"gitTreeCompare.resetCheckboxOnFileChange": {
"type": "boolean",
"description": "When enabled, automatically resets checkboxes when a file is modified after being checked. This ensures that checked files reflect their reviewed state, and any subsequent modifications require re-review.",
Expand Down
9 changes: 8 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ export function activate(context: ExtensionContext) {
commands.registerCommand(NAMESPACE + '.hideCheckboxes', () => {
runAfterInit(() => provider!.hideCheckboxes(true));
});
commands.registerCommand(NAMESPACE + '.showDiffDetails', () => {
runAfterInit(() => provider!.hideDiffDetails(false));
});
commands.registerCommand(NAMESPACE + '.hideDiffDetails', () => {
runAfterInit(() => provider!.hideDiffDetails(true));
});
commands.registerCommand(NAMESPACE + '.viewAsList', () => {
runAfterInit(() => provider!.viewAsTree(false));
});
Expand Down Expand Up @@ -135,7 +141,8 @@ export function activate(context: ExtensionContext) {
commands.executeCommand('setContext', NAMESPACE + '.viewAsList', false);
commands.executeCommand('setContext', NAMESPACE + '.isFiltered', false);

provider = new GitTreeCompareProvider(git, gitApi, outputChannel, context.globalState, context.asAbsolutePath);
const storageUri = context.storageUri || context.globalStorageUri;
provider = new GitTreeCompareProvider(git, gitApi, outputChannel, context.globalState, context.asAbsolutePath, storageUri);

const treeView = window.createTreeView(
NAMESPACE,
Expand Down
Loading