a1200f5bccd7c0ebe327ccbc554d56247136d48c

Author
slavaGanzin <slava.ganzin@gmail.com>
Committer
slavaGanzin <slava.ganzin@gmail.com>
Date

Message

git auto fetch on change directory

Diff

 1diff --git a/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh b/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..841f47baf638c89a93f7e0c81fb2928fdb6d694a
 4--- /dev/null
 5+++ b/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh
 6@@ -0,0 +1,5 @@
 7+function git_fetch_on_chpwd {
 8+  ([[ -d .git ]] && git fetch --all >! ./.git/FETCH_LOG &)
 9+}
10+chpwd_functions=(${chpwd_functions[@]} "git_fetch_on_chpwd")
11+unset git_fetch_on_cpwd