Re: [PATCH 07/16] list-files: show directories as well as files
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 10, 2015, 06:39 UTC
- Message-ID
- <CACsJy8CU=gmaLL1Nvsai-gtH=Qz876ciiX7LTFgV2-zBRRz1ww@mail.gmail.com>
- In-Reply-To
- <CAPig+cSCTJH-otgWAQxwjwkw0SbP4OFXyDhUZs=0bzoL7B32ig@mail.gmail.com>
On Tue, Mar 10, 2015 at 1:23 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 9 quoted lines
>> +static int add_directory(struct string_list *result,
>> + const char *name)
>> +{
>> + struct strbuf sb = STRBUF_INIT;
>> + const char *p;
>> +
>> + strbuf_add(&sb, name, strlen(name));
>
> strbuf_addstr() perhaps?Yeah. The previous version of this function takes string length as an argument, but then I dropped that and used strlen() instead. Thanks for catching.
-- Duy