|
8 | 8 | #define DISABLE_SIGN_COMPARE_WARNINGS
|
9 | 9 |
|
10 | 10 | #include "builtin.h"
|
| 11 | +#include "gvfs.h" |
11 | 12 | #include "bulk-checkin.h"
|
12 | 13 | #include "config.h"
|
13 | 14 | #include "environment.h"
|
@@ -922,7 +923,7 @@ static enum parse_opt_result reupdate_callback(
|
922 | 923 | int cmd_update_index(int argc,
|
923 | 924 | const char **argv,
|
924 | 925 | const char *prefix,
|
925 |
| - struct repository *repo UNUSED) |
| 926 | + struct repository *repo) |
926 | 927 | {
|
927 | 928 | int newfd, entries, has_errors = 0, nul_term_line = 0;
|
928 | 929 | enum uc_mode untracked_cache = UC_UNSPECIFIED;
|
@@ -1170,7 +1171,13 @@ int cmd_update_index(int argc,
|
1170 | 1171 | argc = parse_options_end(&ctx);
|
1171 | 1172 |
|
1172 | 1173 | getline_fn = nul_term_line ? strbuf_getline_nul : strbuf_getline_lf;
|
| 1174 | + if (mark_skip_worktree_only && gvfs_config_is_set(repo, GVFS_BLOCK_COMMANDS)) |
| 1175 | + die(_("modifying the skip worktree bit is not supported on a GVFS repo")); |
| 1176 | + |
1173 | 1177 | if (preferred_index_format) {
|
| 1178 | + if (preferred_index_format != 4 && gvfs_config_is_set(repo, GVFS_BLOCK_COMMANDS)) |
| 1179 | + die(_("changing the index version is not supported on a GVFS repo")); |
| 1180 | + |
1174 | 1181 | if (preferred_index_format < 0) {
|
1175 | 1182 | printf(_("%d\n"), the_repository->index->version);
|
1176 | 1183 | } else if (preferred_index_format < INDEX_FORMAT_LB ||
|
@@ -1216,6 +1223,9 @@ int cmd_update_index(int argc,
|
1216 | 1223 | end_odb_transaction();
|
1217 | 1224 |
|
1218 | 1225 | if (split_index > 0) {
|
| 1226 | + if (gvfs_config_is_set(repo, GVFS_BLOCK_COMMANDS)) |
| 1227 | + die(_("split index is not supported on a GVFS repo")); |
| 1228 | + |
1219 | 1229 | if (repo_config_get_split_index(the_repository) == 0)
|
1220 | 1230 | warning(_("core.splitIndex is set to false; "
|
1221 | 1231 | "remove or change it, if you really want to "
|
|
0 commit comments