diff options
author | Gary V. Vaughan <git@mlists.thewrittenword.com> | 2010-05-14 09:31:35 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-31 16:59:27 -0700 |
commit | 4b05548fc0523744b7a1276cfa0f4aae19d6d9c9 (patch) | |
tree | baf4bc01f49247b8811ed5d87dede2456e8b5eff /builtin | |
parent | Makefile: -lpthread may still be necessary when libc has only pthread stubs (diff) | |
download | tgif-4b05548fc0523744b7a1276cfa0f4aae19d6d9c9.tar.xz |
enums: omit trailing comma for portability
Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX
5.1 fails to compile git.
enum style is inconsistent already, with some enums declared on one
line, some over 3 lines with the enum values all on the middle line,
sometimes with 1 enum value per line... and independently of that the
trailing comma is sometimes present and other times absent, often
mixing with/without trailing comma styles in a single file, and
sometimes in consecutive enum declarations.
Clearly, omitting the comma is the more portable style, and this patch
changes all enum declarations to use the portable omitted dangling
comma style consistently.
Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/apply.c | 4 | ||||
-rw-r--r-- | builtin/branch.c | 4 | ||||
-rw-r--r-- | builtin/commit.c | 6 | ||||
-rw-r--r-- | builtin/help.c | 2 | ||||
-rw-r--r-- | builtin/mailinfo.c | 4 | ||||
-rw-r--r-- | builtin/receive-pack.c | 2 | ||||
-rw-r--r-- | builtin/remote.c | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/builtin/apply.c b/builtin/apply.c index 771c972c55..83b8ad9e0b 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -56,7 +56,7 @@ static enum ws_error_action { nowarn_ws_error, warn_on_ws_error, die_on_ws_error, - correct_ws_error, + correct_ws_error } ws_error_action = warn_on_ws_error; static int whitespace_error; static int squelch_whitespace_errors = 5; @@ -64,7 +64,7 @@ static int applied_after_fixing_ws; static enum ws_ignore { ignore_ws_none, - ignore_ws_change, + ignore_ws_change } ws_ignore_action = ignore_ws_none; diff --git a/builtin/branch.c b/builtin/branch.c index 6cf7e721e6..f594af0b3b 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -43,13 +43,13 @@ enum color_branch { BRANCH_COLOR_PLAIN = 1, BRANCH_COLOR_REMOTE = 2, BRANCH_COLOR_LOCAL = 3, - BRANCH_COLOR_CURRENT = 4, + BRANCH_COLOR_CURRENT = 4 }; static enum merge_filter { NO_FILTER = 0, SHOW_NOT_MERGED, - SHOW_MERGED, + SHOW_MERGED } merge_filter; static unsigned char merge_filter_ref[20]; diff --git a/builtin/commit.c b/builtin/commit.c index eb06945ae3..30a00e0b63 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -57,7 +57,7 @@ static struct lock_file false_lock; /* used only for partial commits */ static enum { COMMIT_AS_IS = 1, COMMIT_NORMAL, - COMMIT_PARTIAL, + COMMIT_PARTIAL } commit_style; static const char *logfile, *force_author; @@ -78,7 +78,7 @@ static char *untracked_files_arg, *force_date; static enum { CLEANUP_SPACE, CLEANUP_NONE, - CLEANUP_ALL, + CLEANUP_ALL } cleanup_mode; static char *cleanup_arg; @@ -90,7 +90,7 @@ static int null_termination; static enum { STATUS_FORMAT_LONG, STATUS_FORMAT_SHORT, - STATUS_FORMAT_PORCELAIN, + STATUS_FORMAT_PORCELAIN } status_format = STATUS_FORMAT_LONG; static int opt_parse_m(const struct option *opt, const char *arg, int unset) diff --git a/builtin/help.c b/builtin/help.c index 3182a2bec4..a9836b00ae 100644 --- a/builtin/help.c +++ b/builtin/help.c @@ -26,7 +26,7 @@ enum help_format { HELP_FORMAT_NONE, HELP_FORMAT_MAN, HELP_FORMAT_INFO, - HELP_FORMAT_WEB, + HELP_FORMAT_WEB }; static int show_all = 0; diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c index 4a9729b9b3..2320d981ce 100644 --- a/builtin/mailinfo.c +++ b/builtin/mailinfo.c @@ -17,10 +17,10 @@ static struct strbuf name = STRBUF_INIT; static struct strbuf email = STRBUF_INIT; static enum { - TE_DONTCARE, TE_QP, TE_BASE64, + TE_DONTCARE, TE_QP, TE_BASE64 } transfer_encoding; static enum { - TYPE_TEXT, TYPE_OTHER, + TYPE_TEXT, TYPE_OTHER } message_type; static struct strbuf charset = STRBUF_INIT; diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 0559fcc871..9225dae183 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -16,7 +16,7 @@ enum deny_action { DENY_UNCONFIGURED, DENY_IGNORE, DENY_WARN, - DENY_REFUSE, + DENY_REFUSE }; static int deny_deletes; diff --git a/builtin/remote.c b/builtin/remote.c index 23ece02aad..bd08c0dd89 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -317,7 +317,7 @@ struct push_info { PUSH_STATUS_UPTODATE, PUSH_STATUS_FASTFORWARD, PUSH_STATUS_OUTOFDATE, - PUSH_STATUS_NOTQUERIED, + PUSH_STATUS_NOTQUERIED } status; }; |