On Mon, Oct 31, 2022 at 07:47:18PM +0000, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin <johannes.schindelin@xxxxxx> > > It is unclear as to _why_, but under certain circumstances the warning > about credentials being passed as part of the URL seems to be swallowed > by the `git remote-https` helper in the Windows jobs of Git's CI builds. > > Since it is not actually important how many times Git prints the > warning/error message, as long as it prints it at least once, let's just > make the test a bit more lenient and test for the latter instead of the > former, which works around these CI issues. This makes sense to me. Regardless of whether we actually fix the multiple outputs (which are user-visible and kind of ugly), I don't think there's any reason for our tests to assert the somewhat undesirable output. So this can proceed independently of any fix. > diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh > index 8dd4610a8c2..980c594940b 100755 > --- a/t/t5516-fetch-push.sh > +++ b/t/t5516-fetch-push.sh > @@ -1860,15 +1860,15 @@ test_expect_success LIBCURL 'fetch warns or fails when using username:password' > > test_must_fail git -c transfer.credentialsInUrl=warn fetch https://username:password@224.0.0.1 2>err && > grep "warning: $message" err >warnings && > - test_line_count = 3 warnings && > + test_line_count -ge 1 warnings && I think this test_line_count (and all the others) is now superfluous; the exit code of grep will tell us if we found anything. I don't mind it too much, though, if we're planning to fix the duplicate messages, at which point it becomes s/-ge/=/. -Peff