Skip to content
Open
Changes from 1 commit
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: 5 additions & 1 deletion packages/core/src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ICommit[]>((all, commit) => {
// The -m option will list a commit for each merge parent. This
Expand Down