test(git): pin the return to the including block per included file

Description

Follow-up to !4203 (merged) for the test gap ranehebden pointed out when approving it (!4203 (comment 4104791374)): moving p.hosts = hosts out of the loop over the included files still passed every test.

The parser returns to the including Host block after each file an Include reads. This adds two cases to Test_sshParser_readMatchAndInclude, both with a.conf holding a Host line and b.conf a bare HostName: Include a.conf b.conf, the case from that review, and Include conf.d/* matching the same two files. The test stub's glob now matches patterns and returns the matches in lexical order, as filepath.Glob does. Test-only, no change in behavior.

Related to #8681 (closed)

How has this been tested?

Both new cases pass on main. With p.hosts = hosts moved after both loops, both fail; moved to just after the inner loop, the pattern case fails. The existing tests pass with either move.

go vet and go test ./internal/git/... (Go 1.27.3), golangci-lint run and golangci-lint fmt --diff (v2.15.0, as the lint job runs it), the comment-overlap gate and the commit lint pass.

Screenshots (if appropriate):

Not applicable: test-only change.

Merge request reports

Loading
Loading