Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Set log level to debug when verbose flag is set #3665
I didn't really think on it much; I was just carrying the previous implementation into this refactor. I don't use fetch very often myself, so it didn't occur to me. I'd guess maybe because fetch throws an error by default and the original two implementations (#source and #quiet?) didn't want that behavior? But I'd just be guessing.
I think the fetch implementation would have to look like:
... which reads as less intuitive to my eye. I'd argue that the implementation above is more explicit and straightforward when future-me is awake in the wee hours and trying to divine intent.
Very open to alternative suggestions. Not elegant, but seemed better than adding the same pattern a third time.
I think I'm not following your meaning. The two tests above and the one below intend to prove three separate assertions:
I tend to favor one basic assert per test, so three tests. I suppose I could combine the two, adjust the verbosity twice, and assert twice, if that's what you're getting at. Otherwise, could you say more?