git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Pierre Habouzit <madcoder@debian.org>
Date
Jan 6, 2009, 10:22 UTC
Message-ID
<20090106102202.GA30766@artemis.corp>
In-Reply-To
<1231200669-30684-1-git-send-email-vmiklos@frugalware.org>
On Tue, Jan 06, 2009 at 12:11:09AM +0000, Miklos Vajna wrote:
Show 9 quoted lines
> +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                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Miklos VajnaNext: Miklos Vajna
Message 2 of 19 in “parse-opt: migrate builtin-ls-files.”
  1. parse-opt: migrate builtin-ls-files.Miklos Vajna, Jan 6, 2009
  2. Pierre HabouzitJan 6, 2009
  3. parse-opt: migrate builtin-ls-files.Miklos Vajna, Jan 7, 2009
  4. Pierre HabouzitJan 7, 2009
  5. parse-opt: migrate builtin-ls-files.Miklos Vajna, Jan 8, 2009
  6. Johannes SchindelinJan 8, 2009
  7. Miklos VajnaJan 8, 2009
  8. Miklos VajnaJan 15, 2009
  9. Junio C HamanoJan 15, 2009
  10. Miklos VajnaJan 15, 2009
  11. Miklos VajnaFeb 14, 2009
  12. Junio C HamanoFeb 14, 2009
  13. Johannes SchindelinFeb 14, 2009
  14. parse-opt: migrate builtin-ls-files.Miklos Vajna, Feb 15, 2009
  15. Johannes SchindelinFeb 15, 2009
  16. Miklos VajnaFeb 15, 2009
  17. Turn the flags in struct dir_struct into a single variableJohannes Schindelin, Feb 16, 2009
  18. Miklos VajnaFeb 16, 2009
  19. parse-opt: migrate builtin-ls-files.Miklos Vajna, Feb 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.