diff --git a/builtin/update-microsoft-git.c b/builtin/update-microsoft-git.c index 66e4d8c25fab41..f943b808615fd7 100644 --- a/builtin/update-microsoft-git.c +++ b/builtin/update-microsoft-git.c @@ -56,26 +56,8 @@ static int platform_specific_upgrade(void) #else static int platform_specific_upgrade(void) { - int res; - struct strvec args = STRVEC_INIT; - - printf("Updating apt-get with 'sudo apt-get update'\n\n"); - - strvec_pushl(&args, "sudo", "apt-get", "update", NULL); - res = run_command_v_opt(args.v, 0); - strvec_clear(&args); - - if (res) { - error(_("'sudo apt-get update' failed; is apt-get installed?")); - return 1; - } - - printf("\nUpgrading microsoft-git with 'sudo apt-get upgrade microsoft-git'\n\n"); - strvec_pushl(&args, "sudo", "apt-get", "upgrade", "microsoft-git", NULL); - res = run_command_v_opt(args.v, 0); - strvec_clear(&args); - - return res; + error(_("update-microsoft-git is not supported on this platform")); + return 1; } #endif diff --git a/read-cache.c b/read-cache.c index c1a6abb8168aa9..8d1cdef9987d55 100644 --- a/read-cache.c +++ b/read-cache.c @@ -2411,7 +2411,8 @@ int do_read_index(struct index_state *istate, const char *path, int must_exist) * settings and other properties of the index (if necessary). */ prepare_repo_settings(istate->repo); - if (istate->repo->settings.command_requires_full_index) + if (!istate->repo->settings.sparse_index || + istate->repo->settings.command_requires_full_index) ensure_full_index(istate); else ensure_correct_sparsity(istate);