Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
bonyuta0204 committed Nov 30, 2023
1 parent b0812d0 commit 7a76aa5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/git-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import simpleGit from "simple-git";
const git = simpleGit();

export async function fetchRemoteBranches() {
await git.fetch([]);
await git.fetch(["--unshallow"]);
const branches = await git.branch(["-r"]);
return branches.all.map((branch) => branch.replace("origin/", ""));
}

export async function hasCommitsBetween(
srcBranch: string,
targetBranch: string,
targetBranch: string
) {
const commits = await git.log({
from: srcBranch,
Expand All @@ -20,8 +20,8 @@ export async function hasCommitsBetween(
});
debug(
`Commits between ${srcBranch} and ${targetBranch}: ${JSON.stringify(
commits,
)}`,
commits
)}`
);
return commits.total > 0;
}

0 comments on commit 7a76aa5

Please sign in to comment.