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>
This commit is contained in:

committed by
Junio C Hamano

parent
48793cf46a
commit
4b05548fc0
@ -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)
|
||||
|
Reference in New Issue
Block a user