Skip to content

Commit

Permalink
Merge pull request #6 from HiDeoo/hd-fix-commit-ignore-pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo committed Jan 3, 2024
2 parents 5cfe918 + bba5497 commit 7bf5fcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
### 🐞 Bug Fixes

- Fix path issue when no root locale is defined.
- Fix issue with some commit being incorrectly ignored.

## v0.1.1

Expand Down
3 changes: 2 additions & 1 deletion src/libs/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export async function getFileChanges(file: Uri): Promise<GitFileChanges> {
throw new Error(`Failed to find the last commit for the file at '${file.fsPath}'.`)
}

const previousCommit = commits.find((commit) => !ignoredCommitPattern.test(commit.message)) ?? lastCommit
const previousCommit =
commits.find((commit) => !ignoredCommitPattern.test(commit.message.split('\n')[0] ?? '')) ?? lastCommit

if (!lastCommit.commitDate || !previousCommit.commitDate) {
throw new Error(`Failed to find commit dates for the file at '${file.fsPath}'.`)
Expand Down

0 comments on commit 7bf5fcb

Please sign in to comment.