Added check for .git directory in current, before wasting time querying git. This saves seconds on my pc.
Add submodule helpers to Git plugin

From #1116

Modified: compdef needs _git entry point
Modifier: ncanceill <https://github.com/ncanceill>

Original commit:
Author :     Maxime Fabre <ehtnam6@gmail.com>

diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index 6e6ba05..53046de 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -161,4 +161,10 @@ alias gunignore='git update-index --no-assume-unchanged'
 alias gignored='git ls-files -v | grep "^[[:lower:]]"'

-
+# Submodules
+alias gf='git fetch'
+compdef _git gf=git-fetch
+alias gsi='git submodule init'
+compdef gsi=git-submodule
+alias gsu='git submodule update'
+compdef gsu=git-submodule
Additional commands to git plugin

Original author :     Kirill Panshin <kipanshi@gmail.com>
Merged & cleaned by:  ncanceill <https://github.com/ncanceill>
Add aliases for `git rebase` and `git rebase skip`

Original author :     Marten Lienen <marten.lienen@gmail.com>
Merged & cleaned by:  ncanceill <https://github.com/ncanceill>
fix gwip alias for some BSD flavors, fixes #2692
plugins/git: missing compdefs, fix bad copy-paste

Original author :     Hervé Cauwelier <herve.cauwelier@polyconseil.fr>
Merged & cleaned by:  ncanceill <https://github.com/ncanceill>
Fix gmt compdef

Fix typo: gm -> gmt
add alias for 'git stash list'
Merge pull request #1 from thuai/plugin-git

add alias for 'git stash list'
re-organized plugin (no real change)
update aliases to default to current branch, fixes #1601
improve readme to abide by #2640
change alias gwc to gwch, fixes #2463
typo, fixes #1806
Minor markup edits
Fixing typo.
add aliases from #2494
Write the update file even if `CLOBBER` is unset.
This is already done in lib/theme-and-appearance.zsh and supports Darwin/BSD/etc
Fix dud alias. Switch --max-depth for just -d

As far as I can tell (tested on Linux & Darwin, BSD man page seems to agree), `-d` is pretty univerally accepted as the depth argument.  So instead of doing a test, we can just use -d and call it a day.