@@ -1542,17 +1542,34 @@ struct repository *repo UNUSED)
1542
1542
STATUS_FORMAT_LONG ),
1543
1543
OPT_BOOL ('z' , "null" , & s .null_termination ,
1544
1544
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
+ },
1556
1573
OPT_COLUMN (0 , "column" , & s .colopts , N_ ("list untracked files in columns" )),
1557
1574
OPT_BOOL (0 , "no-renames" , & no_renames , N_ ("do not detect renames" )),
1558
1575
OPT_CALLBACK_F ('M' , "find-renames" , & rename_score_arg ,
@@ -1688,8 +1705,16 @@ int cmd_commit(int argc,
1688
1705
OPT_BOOL ('e' , "edit" , & edit_flag , N_ ("force edit of commit" )),
1689
1706
OPT_CLEANUP (& cleanup_arg ),
1690
1707
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
+ },
1693
1718
/* end commit message options */
1694
1719
1695
1720
OPT_GROUP (N_ ("Commit contents options" )),
@@ -1714,7 +1739,16 @@ int cmd_commit(int argc,
1714
1739
N_ ("terminate entries with NUL" )),
1715
1740
OPT_BOOL (0 , "amend" , & amend , N_ ("amend previous commit" )),
1716
1741
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
+ },
1718
1752
OPT_PATHSPEC_FROM_FILE (& pathspec_from_file ),
1719
1753
OPT_PATHSPEC_FILE_NUL (& pathspec_file_nul ),
1720
1754
/* end commit contents options */
0 commit comments