commit | 5a4ffdf5873bc15af39a59eef4766cc4240ed586 | [log] [tgz] |
---|---|---|
author | Junio C Hamano <gitster@pobox.com> | Fri May 05 12:17:55 2017 +0900 |
committer | Junio C Hamano <gitster@pobox.com> | Fri May 05 12:17:55 2017 +0900 |
tree | 0513ab09343450a3b9a5528c884a54933944fbed | |
parent | 765428699a5381f113d19974720bc91b5bfeaf1d [diff] | |
parent | 3ec804490a265f4c418a321428c12f3f18b7eff5 [diff] |
Merge branch 'jk/shell-no-repository-that-begins-with-dash' into maint-2.4 * jk/shell-no-repository-that-begins-with-dash: shell: disallow repo names beginning with dash
diff --git a/shell.c b/shell.c index ace62e4..c3bf8ec 100644 --- a/shell.c +++ b/shell.c
@@ -13,7 +13,7 @@ const char *my_argv[4]; setup_path(); - if (!arg || !(arg = sq_dequote(arg))) + if (!arg || !(arg = sq_dequote(arg)) || *arg == '-') die("bad argument"); if (!starts_with(me, "git-")) die("bad command");