From 5003c489f284f2b781f8a92b56f922c18ce9078d Mon Sep 17 00:00:00 2001 From: ayushmaheshwari Date: Tue, 16 Apr 2024 21:00:20 +0530 Subject: [PATCH] wip: removed fatal log --- pkg/git/RepositoryManagerAnalytics.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/git/RepositoryManagerAnalytics.go b/pkg/git/RepositoryManagerAnalytics.go index 0e4e00a5..676143b9 100644 --- a/pkg/git/RepositoryManagerAnalytics.go +++ b/pkg/git/RepositoryManagerAnalytics.go @@ -9,7 +9,6 @@ import ( "github.com/go-git/go-git/v5/plumbing/object" "go.uber.org/zap" "io" - "log" "strings" "time" ) @@ -78,7 +77,7 @@ func computeDiff(r *git.Repository, newHash *plumbing.Hash, oldHash *plumbing.Ha m, err := ancestorStack[lastIndex].MergeBase(c2) //fmt.Printf("mergebase between %s and %s is %s length %d\n", ancestorStack[lastIndex].Hash.String(), c2.Hash.String(), m[0].Hash.String(), len(m)) if err != nil { - log.Fatal("Error in mergebase " + ancestorStack[lastIndex].Hash.String() + " " + c2.Hash.String()) + return nil, fmt.Errorf("error in mergebase %s %s - err %w", ancestorStack[lastIndex].Hash.String(), c2.Hash.String(), err) } // if commit being analyzed is itself merge commit then dont process as it is common in both old and new if in(ancestorStack[lastIndex], m) {