Commit 9748e39d authored by Stefan Beller's avatar Stefan Beller Committed by Junio C Hamano

submodule deinit: handle non existing pathspecs gracefully

This fixes a regression introduced in 2e612731 (submodule: port
submodule subcommand 'deinit' from shell to C, 2018-01-15), when
handling pathspecs that do not exist gracefully. This restores the
historic behavior of reporting the pathspec as unknown and returning
instead of reporting a bug.
Reported-by: Peter Oberndorfer's avatarPeter Oberndorfer <kumbayo84@arcor.de>
Signed-off-by: Stefan Beller's avatarStefan Beller <sbeller@google.com>
Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
parent 2e612731
......@@ -1042,7 +1042,7 @@ static int module_deinit(int argc, const char **argv, const char *prefix)
die(_("Use '--all' if you really want to deinitialize all submodules"));
if (module_list_compute(argc, argv, prefix, &pathspec, &list) < 0)
BUG("module_list_compute should not choke on empty pathspec");
return 1;
info.prefix = prefix;
if (quiet)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment