diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-05 23:42:07 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-05 23:42:07 -0800 |
commit | 971e829cd84cf95203cec44d22d0e009f98ddbf5 (patch) | |
tree | cb444c4dec360e625709b3a1db91d1e99acf9197 /git.c | |
parent | Merge branch 'jk/error-const-return' (diff) | |
parent | add global --literal-pathspecs option (diff) | |
download | tgif-971e829cd84cf95203cec44d22d0e009f98ddbf5.tar.xz |
Merge branch 'jk/pathspec-literal'
Allow scripts to feed literal paths to commands that take
pathspecs, by disabling wildcard globbing.
* jk/pathspec-literal:
add global --literal-pathspecs option
Conflicts:
dir.c
Diffstat (limited to 'git.c')
-rw-r--r-- | git.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -135,6 +135,14 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) git_config_push_parameter((*argv)[1]); (*argv)++; (*argc)--; + } else if (!strcmp(cmd, "--literal-pathspecs")) { + setenv(GIT_LITERAL_PATHSPECS_ENVIRONMENT, "1", 1); + if (envchanged) + *envchanged = 1; + } else if (!strcmp(cmd, "--no-literal-pathspecs")) { + setenv(GIT_LITERAL_PATHSPECS_ENVIRONMENT, "0", 1); + if (envchanged) + *envchanged = 1; } else { fprintf(stderr, "Unknown option: %s\n", cmd); usage(git_usage_string); |