From 0683fc98a35c6679af989e6473a16100f0efbd49 Mon Sep 17 00:00:00 2001 From: Ahrav Dutta Date: Tue, 13 Feb 2024 07:10:44 -0800 Subject: [PATCH] add comment --- pkg/gitparse/gitparse.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/gitparse/gitparse.go b/pkg/gitparse/gitparse.go index 752a8c979469..dbcf4604c6b0 100644 --- a/pkg/gitparse/gitparse.go +++ b/pkg/gitparse/gitparse.go @@ -405,6 +405,7 @@ func (c *Parser) FromReader(ctx context.Context, stdOut io.Reader, diffChan chan if !currentCommit.hasDiffs { // Initialize an empty Diff instance associated with the given commit. // Since this diff represents "no changes", we only need to set the commit. + // This is required to ensure commits that have no diffs are still processed. diffChan <- &Diff{Commit: currentCommit} } }