Re: [RFC PATCH v2] builtin/shortlog: explicitly set hash algo when there is no repo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux