On Fri, May 11, 2018 at 4:06 PM, SZEDER Gábor <szeder.dev@xxxxxxxxx> wrote: > On Thu, May 10, 2018 at 10:46 AM, Nguyễn Thái Ngọc Duy > <pclouds@xxxxxxxxx> wrote: >> Instead of parsing "git help -a" output, which is tricky to get right, >> less elegant and also slow, > > Is it tricky? It seems rather straightforward. But there are traps. [1] is a reported one. And since you're parsing what's meant for human reader, this code could easily break in the future. [1] https://public-inbox.org/git/CAPQz56bts8zFfUHyKJqnefQoH97L5TTA-k3be=5HsdeEbcMqOA@xxxxxxxxxxxxxx/ > Is it slow? Well, there is a pipe and an egrep, sure, but thanks to > caching it's only run once, so basically doesn't matter. This I agree is an exaggeration. Ultimately though I am breaking down and providing the information pieces to __git_list_porcelain_commands() and it happens to benefit this one too. Perhaps I should rephrase my commit to say this. -- Duy