964
N_("like --refresh, but ignore assume-unchanged setting"),
965
PARSE_OPT_NOARG | PARSE_OPT_NONEG,
966
really_refresh_callback),
967
- {OPTION_LOWLEVEL_CALLBACK, 0, "cacheinfo", NULL,
968
- N_("<mode>,<object>,<path>"),
969
- N_("add the specified entry to the index"),
970
- PARSE_OPT_NOARG | /* disallow --cacheinfo=<mode> form */
971
- PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
972
- NULL, 0,
973
- cacheinfo_callback},
967
+ {
968
+ .type = OPTION_LOWLEVEL_CALLBACK,
969
+ .long_name = "cacheinfo",
970
+ .argh = N_("<mode>,<object>,<path>"),
971
+ .help = N_("add the specified entry to the index"),
972
+ .flags = PARSE_OPT_NOARG | /* disallow --cacheinfo=<mode> form */
973
+ PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
974
+ .ll_callback = cacheinfo_callback,
975
+ },
976
OPT_CALLBACK_F(0, "chmod", &set_executable_bit, "(+|-)x",
977
N_("override the executable bit of the listed files"),
978
PARSE_OPT_NONEG,
979
chmod_callback),
978
- {OPTION_SET_INT, 0, "assume-unchanged", &mark_valid_only, NULL,
979
- N_("mark files as \"not changing\""),
980
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, MARK_FLAG},
981
- {OPTION_SET_INT, 0, "no-assume-unchanged", &mark_valid_only, NULL,
982
- N_("clear assumed-unchanged bit"),
983
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, UNMARK_FLAG},
984
- {OPTION_SET_INT, 0, "skip-worktree", &mark_skip_worktree_only, NULL,
985
- N_("mark files as \"index-only\""),
986
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, MARK_FLAG},
987
- {OPTION_SET_INT, 0, "no-skip-worktree", &mark_skip_worktree_only, NULL,
988
- N_("clear skip-worktree bit"),
989
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, UNMARK_FLAG},
980
+ {
981
+ .type = OPTION_SET_INT,
982
+ .long_name = "assume-unchanged",
983
+ .value = &mark_valid_only,
984
+ .help = N_("mark files as \"not changing\""),
985
+ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
986
+ .defval = MARK_FLAG,
987
+ },
988
+ {
989
+ .type = OPTION_SET_INT,
990
+ .long_name = "no-assume-unchanged",
991
+ .value = &mark_valid_only,
992
+ .help = N_("clear assumed-unchanged bit"),
993
+ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
994
+ .defval = UNMARK_FLAG,
995
+ },
996
+ {
997
+ .type = OPTION_SET_INT,
998
+ .long_name = "skip-worktree",
999
+ .value = &mark_skip_worktree_only,
1000
+ .help = N_("mark files as \"index-only\""),
1001
+ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
1002
+ .defval = MARK_FLAG,
1003
+ },
1004
+ {
1005
+ .type = OPTION_SET_INT,
1006
+ .long_name = "no-skip-worktree",
1007
+ .value = &mark_skip_worktree_only,
1008
+ .help = N_("clear skip-worktree bit"),
1009
+ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
1010
+ .defval = UNMARK_FLAG,
1011
+ },
1012
OPT_BOOL(0, "ignore-skip-worktree-entries", &ignore_skip_worktree_entries,
1013
N_("do not touch index-only entries")),
1014
OPT_SET_INT(0, "info-only", &info_only,
1017
N_("remove named paths even if present in worktree"), 1),
1018
OPT_BOOL('z', NULL, &nul_term_line,
1019
N_("with --stdin: input lines are terminated by null bytes")),
998
- {OPTION_LOWLEVEL_CALLBACK, 0, "stdin", &read_from_stdin, NULL,
999
- N_("read list of paths to be updated from standard input"),
1000
- PARSE_OPT_NONEG | PARSE_OPT_NOARG,
1001
- NULL, 0, stdin_callback},
1002
- {OPTION_LOWLEVEL_CALLBACK, 0, "index-info", &nul_term_line, NULL,
1003
- N_("add entries from standard input to the index"),
1004
- PARSE_OPT_NONEG | PARSE_OPT_NOARG,
1005
- NULL, 0, stdin_cacheinfo_callback},
1006
- {OPTION_LOWLEVEL_CALLBACK, 0, "unresolve", &has_errors, NULL,
1007
- N_("repopulate stages #2 and #3 for the listed paths"),
1008
- PARSE_OPT_NONEG | PARSE_OPT_NOARG,
1009
- NULL, 0, unresolve_callback},
1010
- {OPTION_LOWLEVEL_CALLBACK, 'g', "again", &has_errors, NULL,
1011
- N_("only update entries that differ from HEAD"),
1012
- PARSE_OPT_NONEG | PARSE_OPT_NOARG,
1013
- NULL, 0, reupdate_callback},
1020
+ {
1021
+ .type = OPTION_LOWLEVEL_CALLBACK,
1022
+ .long_name = "stdin",
1023
+ .value = &read_from_stdin,
1024
+ .help = N_("read list of paths to be updated from standard input"),
1025
+ .flags = PARSE_OPT_NONEG | PARSE_OPT_NOARG,
1026
+ .ll_callback = stdin_callback,
1027
+ },
1028
+ {
1029
+ .type = OPTION_LOWLEVEL_CALLBACK,
1030
+ .long_name = "index-info",
1031
+ .value = &nul_term_line,
1032
+ .help = N_("add entries from standard input to the index"),
1033
+ .flags = PARSE_OPT_NONEG | PARSE_OPT_NOARG,
1034
+ .ll_callback = stdin_cacheinfo_callback,
1035
+ },
1036
+ {
1037
+ .type = OPTION_LOWLEVEL_CALLBACK,
1038
+ .long_name = "unresolve",
1039
+ .value = &has_errors,
1040
+ .help = N_("repopulate stages #2 and #3 for the listed paths"),
1041
+ .flags = PARSE_OPT_NONEG | PARSE_OPT_NOARG,
1042
+ .ll_callback = unresolve_callback,
1043
+ },
1044
+ {
1045
+ .type = OPTION_LOWLEVEL_CALLBACK,
1046
+ .short_name = 'g',
1047
+ .long_name = "again",
1048
+ .value = &has_errors,
1049
+ .help = N_("only update entries that differ from HEAD"),
1050
+ .flags = PARSE_OPT_NONEG | PARSE_OPT_NOARG,
1051
+ .ll_callback = reupdate_callback,
1052
+ },
1053
OPT_BIT(0, "ignore-missing", &refresh_args.flags,
1054
N_("ignore files missing from worktree"),
1055
REFRESH_IGNORE_MISSING),
1075
N_("write out the index even if is not flagged as changed"), 1),
1076
OPT_BOOL(0, "fsmonitor", &fsmonitor,
1077
N_("enable or disable file system monitor")),
1039
- {OPTION_SET_INT, 0, "fsmonitor-valid", &mark_fsmonitor_only, NULL,
1040
- N_("mark files as fsmonitor valid"),
1041
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, MARK_FLAG},
1042
- {OPTION_SET_INT, 0, "no-fsmonitor-valid", &mark_fsmonitor_only, NULL,
1043
- N_("clear fsmonitor valid bit"),
1044
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, UNMARK_FLAG},
1078
+ {
1079
+ .type = OPTION_SET_INT,
1080
+ .long_name = "fsmonitor-valid",
1081
+ .value = &mark_fsmonitor_only,
1082
+ .help = N_("mark files as fsmonitor valid"),
1083
+ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
1084
+ .defval = MARK_FLAG,
1085
+ },
1086
+ {
1087
+ .type = OPTION_SET_INT,
1088
+ .long_name = "no-fsmonitor-valid",
1089
+ .value = &mark_fsmonitor_only,
1090
+ .help = N_("clear fsmonitor valid bit"),
1091
+ .flags = PARSE_OPT_NOARG | PARSE_OPT_NONEG,
1092
+ .defval = UNMARK_FLAG,
1093
+ },
1094
OPT_END()
1095
};
1096