Subject: Re: [PATCH] parse-opt: migrate builtin-ls-files.

From: Pierre Habouzit <[email-masked]>
Date: Tue, 06 Jan 2009 11:22:02 +0100

On Tue, Jan 06, 2009 at 12:11:09AM +0000, Miklos Vajna wrote:

> +static int option_parse_no_empty(const struct option *opt,
> +				 const char *arg, int unset)
> +{
> +	struct dir_struct *dir = opt->value;
> +
> +	dir->hide_empty_directories = 1;
> +
> +	return 0;
> +}

Should be option_parse_empty and deal with "unset" to know if `no-` was
prefixed to it or not.

> +		{ OPTION_CALLBACK, 0, "no-empty-directory", &dir, NULL,
> +			"do not list empty directories",

This should be "empty-directory" and "list empty directories as well"

I've not checked if you could also check more of the "unsets" things in
your callbacks as well btw, but it looks like it could.

-- 
·O·  Pierre Habouzit
··O                                                [email-masked]
OOO                                                http://www.madism.org