Skip to content

Commit 5a4ffdf

Browse files
committed
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
2 parents 7654286 + 3ec8044 commit 5a4ffdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ static int do_generic_cmd(const char *me, char *arg)
1313
const char *my_argv[4];
1414

1515
setup_path();
16-
if (!arg || !(arg = sq_dequote(arg)))
16+
if (!arg || !(arg = sq_dequote(arg)) || *arg == '-')
1717
die("bad argument");
1818
if (!starts_with(me, "git-"))
1919
die("bad command");

0 commit comments

Comments
 (0)