Re: [PATCH] dir: avoid allocation in fill_directory()

2017-02-10 Thread René Scharfe
Am 08.02.2017 um 07:22 schrieb Duy Nguyen: On Wed, Feb 8, 2017 at 5:04 AM, René Scharfe wrote: Pass the match member of the first pathspec item directly to read_directory() instead of using common_prefix() to duplicate it first, thus avoiding memory duplication, strlen(3) and

Re: [PATCH] dir: avoid allocation in fill_directory()

2017-02-08 Thread Brandon Williams
On 02/08, Duy Nguyen wrote: > On Wed, Feb 8, 2017 at 5:04 AM, René Scharfe wrote: > > Pass the match member of the first pathspec item directly to > > read_directory() instead of using common_prefix() to duplicate it first, > > thus avoiding memory duplication, strlen(3) and

Re: [PATCH] dir: avoid allocation in fill_directory()

2017-02-07 Thread Duy Nguyen
On Wed, Feb 8, 2017 at 5:04 AM, René Scharfe wrote: > Pass the match member of the first pathspec item directly to > read_directory() instead of using common_prefix() to duplicate it first, > thus avoiding memory duplication, strlen(3) and free(3). How about killing

[PATCH] dir: avoid allocation in fill_directory()

2017-02-07 Thread René Scharfe
Pass the match member of the first pathspec item directly to read_directory() instead of using common_prefix() to duplicate it first, thus avoiding memory duplication, strlen(3) and free(3). Signed-off-by: Rene Scharfe --- This updates 966de3028 (dir: convert fill_directory to use