From: Johannes Schindelin Date: Sat, 13 Oct 2007 14:47:20 GMT Subject: Re: [PATCH] Port builtin-add.c to use the new option parser. Message-ID: In-Reply-To: <1192282153-26684-3-git-send-email-madcoder@debian.org> Hi, On Sat, 13 Oct 2007, Pierre Habouzit wrote: > +static struct option builtin_add_options[] = { > + OPT_BOOLEAN('i', "interactive", &add_interactive, "interactive picking"), > + OPT_BOOLEAN('n', NULL, &show_only, "dry-run"), > + OPT_BOOLEAN('f', NULL, &ignored_too, "allow adding otherwise ignored files"), > + OPT_BOOLEAN('v', NULL, &verbose, "be verbose"), > + OPT_BOOLEAN('u', NULL, &take_worktree_changes, "update only files that git already knows about"), > + OPT_BOOLEAN( 0 , "refresh", &refresh_only, "don't add, only refresh stat() informations in the index"), > +}; I see you terminate the list by a ",". How does this play with the option parser? Thinking about this more, I am reverting my stance on the ARRAY_SIZE() issue. I think if you introduce a "OPTION_NONE = 0" in the enum, then this single last comma should be enough. In the same vein, you would not need the NULL in builtin_add_usage[], right? Ciao, Dscho