From: Marius Storm-Olsen <marius@trolltech.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git <git@vger.kernel.org>
Subject: Re: [PATCH 1/3] Add an optional <mode> argument to commit/status -u|--untracked-files option
Date: Mon, 09 Jun 2008 08:54:31 +0200 [thread overview]
Message-ID: <484CD3A7.8090303@trolltech.com> (raw)
In-Reply-To: <7v4p86qa93.fsf@gitster.siamese.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 1573 bytes --]
Junio C Hamano said the following on 07.06.2008 03:55:
> Marius Storm-Olsen <marius@trolltech.com> 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.
Ops, obviously it should have been s@\(int\)@(intptr_t)@. Sorry about
that, I'll resend the patch series.
(The option struct in parse_options.h uses intptr_t for the default
value of an option, thus a normal const char * would make the compiler
complain (verified with both Windows MinGW 3.4.5 and Linux GCC 4.1.2))
BTW, which compiler version are you using?
--
.marius [@trolltech.com]
'if you know what you're doing, it's not research'
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]
next prev parent reply other threads:[~2008-06-09 6:55 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 9:29 [PATCH] Ensure that commit/status don't stat all files when core.ignoreStat = true Marius Storm-Olsen
2008-05-27 20:00 ` Junio C Hamano
2008-05-27 20:21 ` Marius Storm-Olsen
2008-05-30 11:14 ` [PATCH 1/3] Clearify the documentation for core.ignoreStat Marius Storm-Olsen
2008-05-30 8:54 ` [PATCH 2/3] Introduce core.showUntrackedFiles to make it possible to disable showing of untracked files Simon Hausmann
2008-05-30 12:38 ` [PATCH 3/3] Add shortcut in refresh_cache_ent() for marked entries Marius Storm-Olsen
2008-05-30 13:14 ` Marius Storm-Olsen
2008-05-30 13:10 ` [PATCH 2/3] Introduce core.showUntrackedFiles to make it possible to disable showing of untracked files Marius Storm-Olsen
2008-05-30 13:16 ` Marius Storm-Olsen
2008-05-30 20:27 ` Junio C Hamano
2008-05-31 6:41 ` Marius Storm-Olsen
2008-06-03 13:09 ` [PATCH] Add an optional <mode> argument to commit/status -u|--untracked-files option Marius Storm-Olsen
2008-06-03 13:12 ` [PATCH] Add configuration option for default untracked files mode Marius Storm-Olsen
2008-06-03 20:02 ` [PATCH] Add an optional <mode> argument to commit/status -u|--untracked-files option Junio C Hamano
2008-06-03 21:00 ` Marius Storm-Olsen
2008-06-05 8:31 ` [PATCH 1/3] " Marius Storm-Olsen
2008-06-05 12:22 ` [PATCH 2/3] Add argument 'no' commit/status option -u|--untracked-files Marius Storm-Olsen
2008-06-05 12:47 ` [PATCH 3/3] Add configuration option for default untracked files mode Marius Storm-Olsen
2008-06-07 1:55 ` [PATCH 1/3] Add an optional <mode> argument to commit/status -u|--untracked-files option Junio C Hamano
2008-06-09 6:54 ` Marius Storm-Olsen [this message]
2008-06-05 8:31 ` Marius Storm-Olsen
2008-06-05 12:22 ` [PATCH 2/3] Add argument 'no' commit/status option -u|--untracked-files Marius Storm-Olsen
2008-06-05 12:47 ` [PATCH 3/3] Add configuration option for default untracked files mode Marius Storm-Olsen
2008-06-10 6:23 ` [PATCH 1/3] Add an optional <mode> argument to commit/status -u|--untracked-files option Junio C Hamano
2008-06-03 20:14 ` [PATCH] " Jeff King
2008-06-03 21:17 ` Marius Storm-Olsen
2008-06-03 22:26 ` しらいしななこ
2008-06-03 22:27 ` Jeff King
[not found] ` <200806032227.m53MRLeD005668@mi0.bluebottle.com>
2008-06-03 22:53 ` Jeff King
2008-06-06 6:32 ` Alex Riesen
2008-06-06 6:56 ` Marius Storm-Olsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=484CD3A7.8090303@trolltech.com \
--to=marius@trolltech.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.