Re: [PATCH 1/3] Add an optional <mode> argument to commit/status -u|--untracked-files option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marius Storm-Olsen <marius@xxxxxxxxxxxxx> writes:

> diff --git a/builtin-commit.c b/builtin-commit.c
> index b294c1f..1f4986b 100644
> --- a/builtin-commit.c
> +++ b/builtin-commit.c
> @@ -102,7 +103,7 @@ static struct option builtin_commit_options[] = {
>  	OPT_BOOLEAN('o', "only", &only, "commit only specified files"),
>  	OPT_BOOLEAN('n', "no-verify", &no_verify, "bypass pre-commit hook"),
>  	OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"),
> -	OPT_BOOLEAN('u', "untracked-files", &untracked_files, "show all untracked files"),
> +	{ OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, "mode", "show untracked files, optional modes: all, normal. (Default: all)", PARSE_OPT_OPTARG, NULL, (int)"all" },

Hmm.

$ make
builtin-commit.c:106: error: initializer element is not constant
builtin-commit.c:106: error: (near initialization for 'builtin_commit_options[18].defval')
make: *** [builtin-commit.o] Error 1

I also have to wonder what the funny cast of (int)"all"  is doing.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux