On Fri, Jun 09, 2017 at 07:19:35PM -0400, Jeff King wrote: > Should "git add" check whether there's a matching .gitmodules entry for > the path and issue a warning otherwise? Here's my attempt at that. [1/2]: add: warn when adding an embedded repository [2/2]: t: move "git add submodule" into test blocks Documentation/config.txt | 3 ++ Documentation/git-add.txt | 7 +++++ advice.c | 2 ++ advice.h | 1 + builtin/add.c | 45 +++++++++++++++++++++++++++- git-submodule.sh | 5 ++-- t/t4041-diff-submodule-option.sh | 8 +++-- t/t4060-diff-submodule-option-diff-format.sh | 8 +++-- t/t7401-submodule-summary.sh | 8 +++-- t/t7414-submodule-mistakes.sh | 40 +++++++++++++++++++++++++ 10 files changed, 115 insertions(+), 12 deletions(-) create mode 100755 t/t7414-submodule-mistakes.sh