On 2024-10-15 13:20, Eric Sunshine wrote: > t/test-lib-functions.sh has a handy nongit() function for running a > command in a non-Git directory: > > nongit git shortlog --author=author <log 2>out Ah, nice, I'll be using that instead, then. > By the way, what is the purpose of capturing output to file "out"? > That file is never consulted. Oh, my bad, that was a leftover from local testing. > Also, can the original crash be reproduced without having to invoke > the additional `git log`? In my tests, this is sufficient: > > echo | nongit git shortlog --author=author Yeah, same as above. I'll take that into account for the next version, thanks! Thinking more about this, any opinion on the specific test for --author? It is a succinct test but also relies on the fact that it "just happens" to be one of the flags handled in parse_revision_opt(). In fact, any such flag (even non-existing ones, like "--foo") would crash shortlog right now. I'm wondering whether there's a more universal way of testing this. -- Wolf