Skip to content

Commit 3e08ea2

Browse files
committed
Do not attempt to show a diff for untracked files
1 parent f5df357 commit 3e08ea2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/commandsAndMenu.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,11 @@ export function addCommands(
447447
for (const file of files) {
448448
const { context, filePath, isText, status } = file;
449449

450+
// nothing to compare to for untracked files
451+
if (status === 'untracked') {
452+
continue;
453+
}
454+
450455
let diffContext = context;
451456
if (!diffContext) {
452457
const specialRef = status === 'staged' ? 'INDEX' : 'WORKING';

0 commit comments

Comments
 (0)