add, reset: ensure submodules can be added or reset
commit5556808690ea245708fb80383be5c1afee2fb3eb
authorBrandon Williams <bmwill@google.com>
Tue, 25 Jul 2017 21:39:16 +0000 (25 14:39 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Aug 2017 21:35:08 +0000 (2 14:35 -0700)
tree48b7ef9c30f3426a1e68b44346d425ec1914eaa1
parent9ef23f91fc22be9327288c8dbb10646bb0bf4340
add, reset: ensure submodules can be added or reset

Commit aee9c7d65 (Submodules: Add the new "ignore" config option for
diff and status) introduced the ignore configuration option for
submodules so that configured submodules could be omitted from the
status and diff commands.  Because this flag is respected in the diff
machinery it has the unintended consequence of potentially prohibiting
users from adding or resetting a submodule, even when a path to the
submodule is explicitly given.

Ensure that submodules can be added or set, even if they are configured
to be ignored, by setting the `DIFF_OPT_OVERRIDE_SUBMODULE_CONFIG` diff
flag.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/add.c
builtin/reset.c