summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-03-02 00:20:44 +0000
committerMichael Allen <michael@michaelallen.io>2015-03-02 00:20:48 +0000
commit921c0d804fd235ef19c3b191696425d7b55738e4 (patch)
tree43cb7d7a15396286b9f8598dd1d9436c5ba05e5b
parent51e4515659671f882eb0446fa1e9e8f87b784866 (diff)
downloadgit-sonar-921c0d804fd235ef19c3b191696425d7b55738e4.tar.gz
git-sonar-921c0d804fd235ef19c3b191696425d7b55738e4.zip
add a sh file for calling the fetch
I tried many ways to get the fetch call to background without staying attached to the current subshell. Ends up it's not possible to nohup or fully disown a function that is defined inside the same file that's calling it. So simple answer, I've created a file `fetch.sh` that can be called inside nohup. It will source `git-base.sh` and call the fetch function.
-rwxr-xr-xfetch.sh3
-rwxr-xr-xgit-base.sh4
2 files changed, 3 insertions, 4 deletions
diff --git a/fetch.sh b/fetch.sh
new file mode 100755
index 0000000..2bf3b45
--- /dev/null
+++ b/fetch.sh
@@ -0,0 +1,3 @@
+source $DOTFILES/zsh/git-prompt/git-base.sh
+
+fetch;
diff --git a/git-base.sh b/git-base.sh
index a4680c6..cf67198 100755
--- a/git-base.sh
+++ b/git-base.sh
@@ -86,10 +86,6 @@ time_to_update() {
fi
}
-fetch_async() {
- fetch &
-}
-
fetch() {
if time_to_update; then
record_timestamp