summaryrefslogtreecommitdiff
path: root/shell.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-05-05 12:17:55 +0900
committerJunio C Hamano <gitster@pobox.com>2017-05-05 12:17:55 +0900
commit5a4ffdf5873bc15af39a59eef4766cc4240ed586 (patch)
tree0513ab09343450a3b9a5528c884a54933944fbed /shell.c
parent765428699a5381f113d19974720bc91b5bfeaf1d (diff)
parent3ec804490a265f4c418a321428c12f3f18b7eff5 (diff)
downloadgit-5a4ffdf5873bc15af39a59eef4766cc4240ed586.tar.gz
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
Diffstat (limited to 'shell.c')
-rw-r--r--shell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell.c b/shell.c
index ace62e4b65..c3bf8ec38a 100644
--- a/shell.c
+++ b/shell.c
@@ -13,7 +13,7 @@ static int do_generic_cmd(const char *me, char *arg)
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");