Skip to content

fix: debug #2498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/core/src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,19 @@ export default class Git {
/** Get the git log for a range of commits */
@memoize()
async getGitLog(start: string, end = "HEAD"): Promise<ICommit[]> {
console.log('Get git log...');
try {
const first = await this.getFirstCommit();
console.log('First commit:', first);
// This "shaExists" is just so we don't have to refactor all the tests
// in auto.test.ts. If the SHA doesn't really exist then the call to
// gitlog will fail too.
const startSha = (await this.shaExists(start))
? await execPromise("git", ["rev-parse", start])
: "";

console.log('Start SHA:', startSha);

const maxNumber = 2147483647;
const log = await gitlog({
repo: process.cwd(),
Expand All @@ -379,6 +383,8 @@ export default class Git {
includeMergeCommitFiles: true,
});

console.log("Git log:", log);

return log
.map((commit) => ({
hash: commit.hash,
Expand Down