string_list: Add STRING_LIST_INIT macro and make use of it.

Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Thiago Farina
2010-07-04 16:46:19 -03:00
committed by Junio C Hamano
parent 8a57c6e943
commit 183113a5ca
16 changed files with 36 additions and 31 deletions

View File

@ -120,7 +120,7 @@ static int add_existing(const char *refname, const unsigned char *sha1, int flag
*/
static int exclude_existing(const char *match)
{
static struct string_list existing_refs = { NULL, 0, 0, 0 };
static struct string_list existing_refs = STRING_LIST_INIT_NODUP;
char buf[1024];
int matchlen = match ? strlen(match) : 0;