Skip to content

Commit 9421904

Browse files
committed
archive: error instead of triggering a segfault in git archive --remote=""
Signed-off-by: emilylime <emilyyyylime+git@gmail.com>
1 parent f93ff17 commit 9421904

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: builtin/archive.c

+4
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ int cmd_archive(int argc,
9797
argc = parse_options(argc, argv, prefix, local_opts, NULL,
9898
PARSE_OPT_KEEP_ALL);
9999

100+
if (remote && !remote[0]) {
101+
usage(N_("Option 'remote' may not be left empty"));
102+
}
103+
100104
init_archivers();
101105

102106
if (output)

0 commit comments

Comments
 (0)