Subject: Re: [PATCH v3 1/3] lockfile.c: remove PATH_MAX limitation (except in resolve_symlink)

From: Junio C Hamano <[email-masked]>
Date: Fri, 01 Aug 2014 10:34:19 -0700

Nguyễn Thái Ngọc Duy  <[email-masked]> writes:

> diff --git a/lockfile.c b/lockfile.c
> index 8fbcb6a..968b28f 100644
> --- a/lockfile.c
> +++ b/lockfile.c
> @@ -7,13 +7,19 @@
>  static struct lock_file *lock_file_list;
>  static const char *alternate_index_output;
>  
> +static void clear_filename(struct lock_file *lk)
> +{
> +	free(lk->filename);
> +	lk->filename = NULL;
> +}
> +

Given that you move commit_locked_index(), which you need to use
this function in, to read-cache.c in your own nd/split-index series,
this will need to be exposed to the wider world, and at that point,
its name will turn out to be too generic.