Re: [PATCH 01/17] mv: convert to using pathspec struct interface

2016-12-08 Thread Brandon Williams
On 12/08, Duy Nguyen wrote: > On Thu, Dec 8, 2016 at 7:36 AM, Brandon Williams wrote: > >> > @@ -25,25 +26,43 @@ static const char **internal_copy_pathspec(const > >> > char *prefix, > >> > { > >> > int i; > >> > const char **result; > >> > + struct

Re: [PATCH 01/17] mv: convert to using pathspec struct interface

2016-12-08 Thread Duy Nguyen
On Thu, Dec 8, 2016 at 7:36 AM, Brandon Williams wrote: >> > @@ -25,25 +26,43 @@ static const char **internal_copy_pathspec(const char >> > *prefix, >> > { >> > int i; >> > const char **result; >> > + struct pathspec ps; >> > ALLOC_ARRAY(result,

Re: [PATCH 01/17] mv: convert to using pathspec struct interface

2016-12-07 Thread Brandon Williams
On 12/07, Duy Nguyen wrote: > On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote: > > Convert the 'internal_copy_pathspec()' function to use the pathspec > > struct interface from using the deprecated 'get_pathspec()' interface. > > > > In addition to this, fix a memory

Re: [PATCH 01/17] mv: convert to using pathspec struct interface

2016-12-07 Thread Duy Nguyen
On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote: > Convert the 'internal_copy_pathspec()' function to use the pathspec > struct interface from using the deprecated 'get_pathspec()' interface. > > In addition to this, fix a memory leak caused by only duplicating some > of

[PATCH 01/17] mv: convert to using pathspec struct interface

2016-12-06 Thread Brandon Williams
Convert the 'internal_copy_pathspec()' function to use the pathspec struct interface from using the deprecated 'get_pathspec()' interface. In addition to this, fix a memory leak caused by only duplicating some of the pathspec elements. Instead always duplicate all of the the pathspec elements as