Jeff King writes:
> Even with keeping the order this can be done in a single linear pass.
> See filter_string_list() for an example.
Heh, I just wasted a few minutes saying the same; I should have
pointed him at these two lines ;-)
Stefan Beller writes:
> Signed-off-by: Stefan Beller
> ---
> sha1-array.c | 39 +++
> sha1-array.h | 3 +++
> 2 files changed, 42 insertions(+)
>
> diff --git a/sha1-array.c b/sha1-array.c
> index 265941fbf40..10eb08b425e 100644
> --- a/sha1-array.c
> +++
On Thu, Aug 09, 2018 at 10:25:52AM -0700, Stefan Beller wrote:
> On Thu, Aug 9, 2018 at 12:39 AM Martin Ågren wrote:
> >
> > On 9 August 2018 at 00:17, Stefan Beller wrote:
> > > +int oid_array_remove_if(struct oid_array *array,
> > > + for_each_oid_fn fn,
> > > +
On Thu, Aug 9, 2018 at 12:39 AM Martin Ågren wrote:
>
> On 9 August 2018 at 00:17, Stefan Beller wrote:
> > +int oid_array_remove_if(struct oid_array *array,
> > + for_each_oid_fn fn,
> > + void *data)
> > +{
> > + int i, j;
> > + char
On 9 August 2018 at 00:17, Stefan Beller wrote:
> +int oid_array_remove_if(struct oid_array *array,
> + for_each_oid_fn fn,
> + void *data)
> +{
> + int i, j;
> + char *to_remove = xcalloc(array->nr, sizeof(char));
Do you really need this
Signed-off-by: Stefan Beller
---
sha1-array.c | 39 +++
sha1-array.h | 3 +++
2 files changed, 42 insertions(+)
diff --git a/sha1-array.c b/sha1-array.c
index 265941fbf40..10eb08b425e 100644
--- a/sha1-array.c
+++ b/sha1-array.c
@@ -77,3 +77,42 @@ int
6 matches
Mail list logo