diff --git a/extensions/git/package.json b/extensions/git/package.json
index 6ffdfb33a49..645361ff5ec 100644
--- a/extensions/git/package.json
+++ b/extensions/git/package.json
@@ -68,6 +68,15 @@
"dark": "resources/icons/dark/open-file.svg"
}
},
+ {
+ "command": "git.openFile2",
+ "title": "%command.openFile%",
+ "category": "Git",
+ "icon": {
+ "light": "resources/icons/light/open-file-mono.svg",
+ "dark": "resources/icons/dark/open-file-mono.svg"
+ }
+ },
{
"command": "git.openHEADFile",
"title": "%command.openHEADFile%",
@@ -369,6 +378,10 @@
"command": "git.revertChange",
"when": "false"
},
+ {
+ "command": "git.openFile2",
+ "when": "false"
+ },
{
"command": "git.unstage",
"when": "gitOpenRepositoryCount != 0"
@@ -712,7 +725,7 @@
"group": "inline"
},
{
- "command": "git.openFile",
+ "command": "git.openFile2",
"when": "scmProvider == git && scmResourceGroup == merge",
"group": "inline0"
},
@@ -742,7 +755,7 @@
"group": "inline"
},
{
- "command": "git.openFile",
+ "command": "git.openFile2",
"when": "scmProvider == git && scmResourceGroup == index",
"group": "inline0"
},
@@ -782,7 +795,7 @@
"group": "inline"
},
{
- "command": "git.openFile",
+ "command": "git.openFile2",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "inline0"
},
diff --git a/extensions/git/resources/icons/dark/open-file-mono.svg b/extensions/git/resources/icons/dark/open-file-mono.svg
new file mode 100644
index 00000000000..830727e70b3
--- /dev/null
+++ b/extensions/git/resources/icons/dark/open-file-mono.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extensions/git/resources/icons/light/open-file-mono.svg b/extensions/git/resources/icons/light/open-file-mono.svg
new file mode 100644
index 00000000000..fa3f245b755
--- /dev/null
+++ b/extensions/git/resources/icons/light/open-file-mono.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extensions/git/resources/icons/light/open-file.svg b/extensions/git/resources/icons/light/open-file.svg
index 85a001dccc2..d23a23c6b5f 100644
--- a/extensions/git/resources/icons/light/open-file.svg
+++ b/extensions/git/resources/icons/light/open-file.svg
@@ -1,3 +1 @@
-
-]>
\ No newline at end of file
+
\ No newline at end of file
diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts
index 9b20e9487bb..d165c520e12 100644
--- a/extensions/git/src/commands.ts
+++ b/extensions/git/src/commands.ts
@@ -533,6 +533,11 @@ export class CommandCenter {
}
}
+ @command('git.openFile2')
+ async openFile2(arg?: Resource | Uri, ...resourceStates: SourceControlResourceState[]): Promise {
+ this.openFile(arg, ...resourceStates);
+ }
+
@command('git.openHEADFile')
async openHEADFile(arg?: Resource | Uri): Promise {
let resource: Resource | undefined = undefined;