From: Johannes Schindelin Date: Fri, 2 Jan 2009 18:08:40 +0000 (+0100) Subject: git add: do not add files from a submodule X-Git-Tag: v1.6.1.1~7^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/2ce53f9b77eb36c6d1286f55fba65f8dc66b2564?hp=2ce53f9b77eb36c6d1286f55fba65f8dc66b2564 git add: do not add files from a submodule It comes quite as a surprise to an unsuspecting Git user that calling "git add submodule/file" (which is a mistake, alright) _removes_ the submodule in the index, and adds the file. Instead, complain loudly. While at it, be nice when the user said "git add submodule/" which is most likely the consequence of tab-completion, and stage the submodule, instead of trying to add the contents of that directory. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano ---