Skip to content

Commit 68cb023

Browse files
committed
Add generated file detection and filtering for git diffs
1 parent f33aa29 commit 68cb023

File tree

3 files changed

+722
-2
lines changed

3 files changed

+722
-2
lines changed

cmd/commit/commit.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ func executeCommit() {
6161
}
6262
}
6363

64-
// Get the staged changes diff
65-
diff := git.GetStagedDiff()
64+
// Get the staged changes diff, filtering out generated files
65+
diff := git.GetStagedDiffFiltered()
6666
if diff == "" {
6767
logger.Error("Could not retrieve diff of staged changes.")
6868
os.Exit(1)

0 commit comments

Comments
 (0)