diff options
Diffstat (limited to 'submodule.c')
-rw-r--r-- | submodule.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/submodule.c b/submodule.c index 12a2503fda..db8bd4a079 100644 --- a/submodule.c +++ b/submodule.c @@ -1166,8 +1166,10 @@ int submodule_touches_in_range(struct object_id *excl_oid, argv_array_push(&args, "--"); /* args[0] program name */ argv_array_push(&args, oid_to_hex(incl_oid)); - argv_array_push(&args, "--not"); - argv_array_push(&args, oid_to_hex(excl_oid)); + if (!is_null_oid(excl_oid)) { + argv_array_push(&args, "--not"); + argv_array_push(&args, oid_to_hex(excl_oid)); + } collect_changed_submodules(&subs, &args); ret = subs.nr; |