summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-05-05 12:17:55 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-05-05 12:17:55 +0900
commit5a4ffdf5873bc15af39a59eef4766cc4240ed586 (patch)
tree0513ab09343450a3b9a5528c884a54933944fbed
parentGit 2.4.11 (diff)
parentshell: disallow repo names beginning with dash (diff)
downloadtgif-5a4ffdf5873bc15af39a59eef4766cc4240ed586.tar.xz
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
-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");