# [PATCH] builtin/clean.c: Use STRING_LIST_INIT_NODUP.

3 messages from 2010-09-06 to 2010-09-07. Participants: Thiago Farina, Junio C Hamano.
Thread: https://gitlist.dev/t/25014

## Thiago Farina, 2010-09-06 23:32

Subject: [PATCH] builtin/clean.c: Use STRING_LIST_INIT_NODUP.
Message-ID: <1283815975-11107-1-git-send-email-tfransosi@gmail.com>
URL: https://gitlist.dev/e/1283815975-11107-1-git-send-email-tfransosi%40gmail.com

```
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
 builtin/clean.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin/clean.c b/builtin/clean.c
index b508d2c..c8798f5 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -44,7 +44,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 	struct dir_struct dir;
 	static const char **pathspec;
 	struct strbuf buf = STRBUF_INIT;
-	struct string_list exclude_list = { NULL, 0, 0, 0 };
+	struct string_list exclude_list = STRING_LIST_INIT_NODUP;
 	const char *qname;
 	char *seen = NULL;
 	struct option options[] = {
-- 
1.7.2.3.313.gcd15

```

## Junio C Hamano, 2010-09-06 23:56

Subject: Re: [PATCH] builtin/clean.c: Use STRING_LIST_INIT_NODUP.
Message-ID: <7vpqwqs9xu.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vpqwqs9xu.fsf%40alter.siamese.dyndns.org
In-Reply-To: <1283815975-11107-1-git-send-email-tfransosi@gmail.com>

```
Good eyes.  Is this the last spelled-out initialization (I didn't check
deeper than running a quick grep for "struct string_list .*= *{")?

Thanks.

```

## Thiago Farina, 2010-09-07 00:03

Subject: Re: [PATCH] builtin/clean.c: Use STRING_LIST_INIT_NODUP.
Message-ID: <AANLkTinGdaAgnYBGB2Y9O6=JrnjqAqRkcNewoT1=jwXL@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTinGdaAgnYBGB2Y9O6%3DJrnjqAqRkcNewoT1%3DjwXL%40mail.gmail.com
In-Reply-To: <7vpqwqs9xu.fsf@alter.siamese.dyndns.org>

```
On Mon, Sep 6, 2010 at 8:56 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Good eyes.  Is this the last spelled-out initialization (I didn't check
> deeper than running a quick grep for "struct string_list .*= *{")?
>
Yup! This is the last. :)

I checked firstly with:
$ git grep -e 'struct string_list [^ ]* = {.*'

And then with yours:
$ git grep -e "struct string_list .*= *{"

```
