Browse Source

Uses branchContainsCommit instead

main
Eric Amodio 4 years ago
parent
commit
0f4adab4af
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      src/views/commitsView.ts

+ 2
- 3
src/views/commitsView.ts View File

@ -294,9 +294,8 @@ export class CommitsView extends ViewBase {
const branch = await Container.git.getBranch(commit.repoPath);
if (branch == null) return undefined;
// Get all the branches the commit is on
const branches = await Container.git.getCommitBranches(commit.repoPath, commit.ref);
if (branches.length === 0 || !branches.includes(branch.name)) return undefined;
// Check if the commit exists on the current branch
if (!(await Container.git.branchContainsCommit(commit.repoPath, branch.name, commit.ref))) return undefined;
return this.findNode((n: any) => n.commit?.ref === commit.ref, {
allowPaging: true,

Loading…
Cancel
Save