Browse Source

Fixes show command with single file commits

main
Eric Amodio 4 years ago
parent
commit
56268988ee
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      src/commands/git/show.ts

+ 7
- 2
src/commands/git/show.ts View File

@ -101,8 +101,13 @@ export class ShowGitCommand extends QuickCommand {
}
}
if (state.counter < 2 || state.reference == null || !GitLogCommit.is(state.reference)) {
if (state.reference != null && !GitLogCommit.is(state.reference)) {
if (
state.counter < 2 ||
state.reference == null ||
!GitLogCommit.is(state.reference) ||
state.reference.isFile
) {
if (state.reference != null && (!GitLogCommit.is(state.reference) || state.reference.isFile)) {
state.reference = await Container.git.getCommit(state.reference.repoPath, state.reference.ref);
}

Loading…
Cancel
Save