diff --git a/packages/core/src/git.ts b/packages/core/src/git.ts index 09dccc6e2..5719e1124 100644 --- a/packages/core/src/git.ts +++ b/packages/core/src/git.ts @@ -379,13 +379,17 @@ export default class Git { includeMergeCommitFiles: true, }); + const repoRootPath = execSync("git rev-parse --show-toplevel", { + encoding: "utf8", + }).trim(); + return log .map((commit) => ({ hash: commit.hash, authorName: commit.authorName, authorEmail: commit.authorEmail, subject: commit.rawBody!, - files: (commit.files || []).map((file) => path.resolve(file)), + files: (commit.files || []).map((file) => path.resolve(repoRootPath,file)), })) .reduce((all, commit) => { // The -m option will list a commit for each merge parent. This