Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable git update-git-for-windows #243

Merged
merged 1 commit into from
Feb 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions builtin.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix);
int cmd_tar_tree(int argc, const char **argv, const char *prefix);
int cmd_unpack_file(int argc, const char **argv, const char *prefix);
int cmd_unpack_objects(int argc, const char **argv, const char *prefix);
int cmd_update(int argc, const char **argv, const char *prefix);
int cmd_update_index(int argc, const char **argv, const char *prefix);
int cmd_update_ref(int argc, const char **argv, const char *prefix);
int cmd_update_server_info(int argc, const char **argv, const char *prefix);
Expand Down
2 changes: 2 additions & 0 deletions git.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,8 @@ static struct cmd_struct commands[] = {
{ "tag", cmd_tag, RUN_SETUP | DELAY_PAGER_CONFIG },
{ "unpack-file", cmd_unpack_file, RUN_SETUP | NO_PARSEOPT },
{ "unpack-objects", cmd_unpack_objects, RUN_SETUP | NO_PARSEOPT },
{ "update", cmd_update },
{ "update-git-for-windows", cmd_update },
{ "update-index", cmd_update_index, RUN_SETUP },
{ "update-ref", cmd_update_ref, RUN_SETUP },
{ "update-server-info", cmd_update_server_info, RUN_SETUP },
Expand Down
16 changes: 16 additions & 0 deletions help.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,3 +794,19 @@ NORETURN void help_unknown_ref(const char *ref, const char *cmd,
string_list_clear(&suggested_refs, 0);
exit(1);
}

int cmd_update(int argc, const char **argv, const char *prefix)
{
const char * const usage[] = {
N_("git update-git-for-windows [<options>]\n"
"\t(not supported in this build of Git for Windows)"),
NULL
};
struct option options[] = {
OPT_END()
};

argc = parse_options(argc, argv, prefix, options, usage, 0);

die(_("git %s is not supported in VFSforGit"), argv[0]);
dscho marked this conversation as resolved.
Show resolved Hide resolved
}
7 changes: 7 additions & 0 deletions t/t0402-block-command-on-gvfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,11 @@ test_expect_success 'test gc --auto succeeds when disabled via config' '
git gc --auto
'

test_expect_success 'update-git-for-windows disabled' '
test_must_fail git update 2>out &&
test_i18ngrep VFS out &&
test_must_fail git update-git-for-windows 2>out &&
test_i18ngrep VFS out
'

test_done