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

Re: [PATCH 2/2] ls-files: fix broken --no-empty-directory

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Mar 8, 2009, 21:13 UTC
Message-ID
<20090308211312.GE4371@genesis.frugalware.org>
In-Reply-To
<20090308012722.GB18714@coredump.intra.peff.net>
On Sat, Mar 07, 2009 at 08:27:22PM -0500, Jeff King <peff@peff.net> wrote:
Show 15 quoted lines
> diff --git a/builtin-ls-files.c b/builtin-ls-files.c
> index 1742c0f..437c366 100644
> --- a/builtin-ls-files.c
> +++ b/builtin-ls-files.c
> @@ -454,8 +454,8 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix)
>  		OPT_BIT(0, "directory", &dir.flags,
>  			"show 'other' directories' name only",
>  			DIR_SHOW_OTHER_DIRECTORIES),
> -		OPT_BIT(0, "empty-directory", &dir.flags,
> -			"list empty directories",
> +		OPT_BIT(0, "no-empty-directory", &dir.flags,
> +			"don't show empty directories",
>  			DIR_HIDE_EMPTY_DIRECTORIES),
>  		OPT_BOOLEAN('u', "unmerged", &show_unmerged,
>  			"show unmerged files in the output"),
Thanks for catching this. But then why not using PARSE_OPT_NONEG?
That would avoid --no-no-empty-directory.
Previous: Jeff KingNext: Jeff King
Message 4 of 6 in “fix ls-files parseopt regression”
  1. 0/2 fix ls-files parseopt regressionJeff King, Mar 8, 2009
  2. 1/2 t3000: use test_cmp instead of diffJeff King, Mar 8, 2009
  3. 2/2 ls-files: fix broken --no-empty-directoryJeff King, Mar 8, 2009
  4. Miklos VajnaMar 8, 2009
  5. Jeff KingMar 10, 2009
  6. Miklos VajnaMar 10, 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.