@@ -1542,17 +1542,34 @@ struct repository *repo UNUSED)
15421542 STATUS_FORMAT_LONG ),
15431543 OPT_BOOL ('z' , "null" , & s .null_termination ,
15441544 N_ ("terminate entries with NUL" )),
1545- { OPTION_STRING , 'u' , "untracked-files" , & untracked_files_arg ,
1546- N_ ("mode" ),
1547- N_ ("show untracked files, optional modes: all, normal, no. (Default: all)" ),
1548- PARSE_OPT_OPTARG , NULL , (intptr_t )"all" },
1549- { OPTION_STRING , 0 , "ignored" , & ignored_arg ,
1550- N_ ("mode" ),
1551- N_ ("show ignored files, optional modes: traditional, matching, no. (Default: traditional)" ),
1552- PARSE_OPT_OPTARG , NULL , (intptr_t )"traditional" },
1553- { OPTION_STRING , 0 , "ignore-submodules" , & ignore_submodule_arg , N_ ("when" ),
1554- N_ ("ignore changes to submodules, optional when: all, dirty, untracked. (Default: all)" ),
1555- PARSE_OPT_OPTARG , NULL , (intptr_t )"all" },
1545+ {
1546+ .type = OPTION_STRING ,
1547+ .short_name = 'u' ,
1548+ .long_name = "untracked-files" ,
1549+ .value = & untracked_files_arg ,
1550+ .argh = N_ ("mode" ),
1551+ .help = N_ ("show untracked files, optional modes: all, normal, no. (Default: all)" ),
1552+ .flags = PARSE_OPT_OPTARG ,
1553+ .defval = (intptr_t )"all" ,
1554+ },
1555+ {
1556+ .type = OPTION_STRING ,
1557+ .long_name = "ignored" ,
1558+ .value = & ignored_arg ,
1559+ .argh = N_ ("mode" ),
1560+ .help = N_ ("show ignored files, optional modes: traditional, matching, no. (Default: traditional)" ),
1561+ .flags = PARSE_OPT_OPTARG ,
1562+ .defval = (intptr_t )"traditional" ,
1563+ },
1564+ {
1565+ .type = OPTION_STRING ,
1566+ .long_name = "ignore-submodules" ,
1567+ .value = & ignore_submodule_arg ,
1568+ .argh = N_ ("when" ),
1569+ .help = N_ ("ignore changes to submodules, optional when: all, dirty, untracked. (Default: all)" ),
1570+ .flags = PARSE_OPT_OPTARG ,
1571+ .defval = (intptr_t )"all" ,
1572+ },
15561573 OPT_COLUMN (0 , "column" , & s .colopts , N_ ("list untracked files in columns" )),
15571574 OPT_BOOL (0 , "no-renames" , & no_renames , N_ ("do not detect renames" )),
15581575 OPT_CALLBACK_F ('M' , "find-renames" , & rename_score_arg ,
@@ -1688,8 +1705,16 @@ int cmd_commit(int argc,
16881705 OPT_BOOL ('e' , "edit" , & edit_flag , N_ ("force edit of commit" )),
16891706 OPT_CLEANUP (& cleanup_arg ),
16901707 OPT_BOOL (0 , "status" , & include_status , N_ ("include status in commit message template" )),
1691- { OPTION_STRING , 'S' , "gpg-sign" , & sign_commit , N_ ("key-id" ),
1692- N_ ("GPG sign commit" ), PARSE_OPT_OPTARG , NULL , (intptr_t ) "" },
1708+ {
1709+ .type = OPTION_STRING ,
1710+ .short_name = 'S' ,
1711+ .long_name = "gpg-sign" ,
1712+ .value = & sign_commit ,
1713+ .argh = N_ ("key-id" ),
1714+ .help = N_ ("GPG sign commit" ),
1715+ .flags = PARSE_OPT_OPTARG ,
1716+ .defval = (intptr_t ) "" ,
1717+ },
16931718 /* end commit message options */
16941719
16951720 OPT_GROUP (N_ ("Commit contents options" )),
@@ -1714,7 +1739,16 @@ int cmd_commit(int argc,
17141739 N_ ("terminate entries with NUL" )),
17151740 OPT_BOOL (0 , "amend" , & amend , N_ ("amend previous commit" )),
17161741 OPT_BOOL (0 , "no-post-rewrite" , & no_post_rewrite , N_ ("bypass post-rewrite hook" )),
1717- { OPTION_STRING , 'u' , "untracked-files" , & untracked_files_arg , N_ ("mode" ), N_ ("show untracked files, optional modes: all, normal, no. (Default: all)" ), PARSE_OPT_OPTARG , NULL , (intptr_t )"all" },
1742+ {
1743+ .type = OPTION_STRING ,
1744+ .short_name = 'u' ,
1745+ .long_name = "untracked-files" ,
1746+ .value = & untracked_files_arg ,
1747+ .argh = N_ ("mode" ),
1748+ .help = N_ ("show untracked files, optional modes: all, normal, no. (Default: all)" ),
1749+ .flags = PARSE_OPT_OPTARG ,
1750+ .defval = (intptr_t )"all" ,
1751+ },
17181752 OPT_PATHSPEC_FROM_FILE (& pathspec_from_file ),
17191753 OPT_PATHSPEC_FILE_NUL (& pathspec_file_nul ),
17201754 /* end commit contents options */
0 commit comments