diff options
| author | 2026-03-06 10:38:46 +0800 | |
|---|---|---|
| committer | 2026-03-06 10:38:46 +0800 | |
| commit | 7987e9350b590a4a9038ad18fe2ff049c0037cb8 (patch) | |
| tree | dafe51aa15701676d52fc07b4b6163207e94e6bd /reachability/walk.go | |
| parent | reachability: Use commit-graph (diff) | |
| signature | No signature | |
reachability, internal/testgit: Fix lints v0.1.56
Diffstat (limited to 'reachability/walk.go')
| -rw-r--r-- | reachability/walk.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/reachability/walk.go b/reachability/walk.go index e96a8b44..4611e46e 100644 --- a/reachability/walk.go +++ b/reachability/walk.go @@ -111,20 +111,20 @@ func (walk *Walk) expand(item walkItem) ([]walkItem, error) { } func (walk *Walk) expandCommits(item walkItem) ([]walkItem, error) { - if walk.reachability.graph != nil { + if walk.reachability.graph != nil { //nolint:nestif next, graphUsed, err := walk.expandCommitsFromGraph(item.id) if err != nil { return nil, err } - if graphUsed { - if walk.strict { - err := walk.validateCommitObject(item.id) - if err != nil { - return nil, err - } + if graphUsed && walk.strict { + err = walk.validateCommitObject(item.id) + if err != nil { + return nil, err } + } + if graphUsed { return next, nil } } |
