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
6
dir.c
6
dir.c
@ -465,7 +465,7 @@ static struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pat
|
||||
enum exist_status {
|
||||
index_nonexistent = 0,
|
||||
index_directory,
|
||||
index_gitdir,
|
||||
index_gitdir
|
||||
};
|
||||
|
||||
/*
|
||||
@ -533,7 +533,7 @@ static enum exist_status directory_exists_in_index(const char *dirname, int len)
|
||||
enum directory_treatment {
|
||||
show_directory,
|
||||
ignore_directory,
|
||||
recurse_into_directory,
|
||||
recurse_into_directory
|
||||
};
|
||||
|
||||
static enum directory_treatment treat_directory(struct dir_struct *dir,
|
||||
@ -684,7 +684,7 @@ static int get_dtype(struct dirent *de, const char *path, int len)
|
||||
enum path_treatment {
|
||||
path_ignored,
|
||||
path_handled,
|
||||
path_recurse,
|
||||
path_recurse
|
||||
};
|
||||
|
||||
static enum path_treatment treat_one_path(struct dir_struct *dir,
|
||||
|
Reference in New Issue
Block a user