rev-parse: --local-env-vars option
This prints the list of repo-local environment variables. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
48a7c1c49d
commit
94c8ccaaba
@ -455,6 +455,13 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
|
||||
if (argc > 1 && !strcmp("--sq-quote", argv[1]))
|
||||
return cmd_sq_quote(argc - 2, argv + 2);
|
||||
|
||||
if (argc == 2 && !strcmp("--local-env-vars", argv[1])) {
|
||||
int i;
|
||||
for (i = 0; local_repo_env[i]; i++)
|
||||
printf("%s\n", local_repo_env[i]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (argc > 1 && !strcmp("-h", argv[1]))
|
||||
usage(builtin_rev_parse_usage);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user