|
8 | 8 | #define DISABLE_SIGN_COMPARE_WARNINGS |
9 | 9 |
|
10 | 10 | #include "builtin.h" |
| 11 | +#include "gvfs.h" |
11 | 12 | #include "config.h" |
12 | 13 | #include "environment.h" |
13 | 14 | #include "gettext.h" |
@@ -914,7 +915,7 @@ static enum parse_opt_result reupdate_callback( |
914 | 915 | int cmd_update_index(int argc, |
915 | 916 | const char **argv, |
916 | 917 | const char *prefix, |
917 | | - struct repository *repo UNUSED) |
| 918 | + struct repository *repo) |
918 | 919 | { |
919 | 920 | int newfd, entries, has_errors = 0, nul_term_line = 0; |
920 | 921 | enum uc_mode untracked_cache = UC_UNSPECIFIED; |
@@ -1178,7 +1179,13 @@ int cmd_update_index(int argc, |
1178 | 1179 | argc = parse_options_end(&ctx); |
1179 | 1180 |
|
1180 | 1181 | getline_fn = nul_term_line ? strbuf_getline_nul : strbuf_getline_lf; |
| 1182 | + if (mark_skip_worktree_only && gvfs_config_is_set(repo, GVFS_BLOCK_COMMANDS)) |
| 1183 | + die(_("modifying the skip worktree bit is not supported on a GVFS repo")); |
| 1184 | + |
1181 | 1185 | if (preferred_index_format) { |
| 1186 | + if (preferred_index_format != 4 && gvfs_config_is_set(repo, GVFS_BLOCK_COMMANDS)) |
| 1187 | + die(_("changing the index version is not supported on a GVFS repo")); |
| 1188 | + |
1182 | 1189 | if (preferred_index_format < 0) { |
1183 | 1190 | printf(_("%d\n"), the_repository->index->version); |
1184 | 1191 | } else if (preferred_index_format < INDEX_FORMAT_LB || |
@@ -1224,6 +1231,9 @@ int cmd_update_index(int argc, |
1224 | 1231 | odb_transaction_commit(transaction); |
1225 | 1232 |
|
1226 | 1233 | if (split_index > 0) { |
| 1234 | + if (gvfs_config_is_set(repo, GVFS_BLOCK_COMMANDS)) |
| 1235 | + die(_("split index is not supported on a GVFS repo")); |
| 1236 | + |
1227 | 1237 | if (repo_config_get_split_index(the_repository) == 0) |
1228 | 1238 | warning(_("core.splitIndex is set to false; " |
1229 | 1239 | "remove or change it, if you really want to " |
|
0 commit comments