Skip to content

Commit 9acfad5

Browse files
committed
Fixes working tree compare cmds on result files
1 parent cd077e7 commit 9acfad5

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

contributions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7837,7 +7837,7 @@
78377837
{
78387838
"when": "viewItem =~ /gitlens:file\\b(?!.*?\\b\\+conflicted\\b)/",
78397839
"group": "1_gitlens",
7840-
"order": 2
7840+
"order": 1
78417841
}
78427842
],
78437843
"view/item/context": [
@@ -8058,7 +8058,7 @@
80588058
{
80598059
"when": "viewItem =~ /gitlens:file\\b(?!.*?\\b\\+(conflicted|stashed|staged|unstaged)\\b)/",
80608060
"group": "1_gitlens",
8061-
"order": 1
8061+
"order": 2
80628062
}
80638063
]
80648064
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13792,13 +13792,13 @@
1379213792
],
1379313793
"gitlens/commit/file/changes": [
1379413794
{
13795-
"command": "gitlens.views.openPreviousChangesWithWorking",
13796-
"when": "viewItem =~ /gitlens:file\\b(?!.*?\\b\\+(conflicted|stashed|staged|unstaged)\\b)/",
13795+
"command": "gitlens.views.openChangesWithWorking",
13796+
"when": "viewItem =~ /gitlens:file\\b(?!.*?\\b\\+conflicted\\b)/",
1379713797
"group": "1_gitlens@1"
1379813798
},
1379913799
{
13800-
"command": "gitlens.views.openChangesWithWorking",
13801-
"when": "viewItem =~ /gitlens:file\\b(?!.*?\\b\\+conflicted\\b)/",
13800+
"command": "gitlens.views.openPreviousChangesWithWorking",
13801+
"when": "viewItem =~ /gitlens:file\\b(?!.*?\\b\\+(conflicted|stashed|staged|unstaged)\\b)/",
1380213802
"group": "1_gitlens@2"
1380313803
},
1380413804
{

src/views/viewCommands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ export class ViewCommands implements Disposable {
15751575

15761576
return CommitActions.openChangesWithWorking(node.file, {
15771577
repoPath: node.repoPath,
1578-
ref: node.is('results-file') ? node.ref2 : node.ref.ref,
1578+
ref: node.is('results-file') && node.ref2 !== '' ? node.ref2 : node.ref.ref,
15791579
});
15801580
}
15811581

@@ -1585,7 +1585,7 @@ export class ViewCommands implements Disposable {
15851585

15861586
return CommitActions.openChangesWithWorking(node.file, {
15871587
repoPath: node.repoPath,
1588-
ref: node.is('results-file') ? node.ref1 : `${node.ref.ref}^`,
1588+
ref: node.is('results-file') && node.ref2 !== '' ? node.ref1 : `${node.ref.ref}^`,
15891589
});
15901590
}
15911591

0 commit comments

Comments
 (0)