Inside submodule directory there is a .git directory itself, many functions work unexpected due to concern sub-directory rather than top directory.