support MacOS
[~madcoder/dotfiles.git] / +bin / git-up
index 35e0e9d..c0172a2 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+. "$(dirname "$0")/setup.sh"
+
 OPTIONS_SPEC="\
 $(basename $0) [options] [<remote> [<branch>]]
 --
@@ -52,7 +54,10 @@ case $# in
     *) usage;;
 esac
 
-git fetch "${remote}"
+git remote update
+if git config remote.mob.fetch >/dev/null 2>/dev/null; then
+    git remote prune mob
+fi
 if test `git rev-list .."${remote}/${branch#refs/heads/}" -- | wc -l` = 0; then
     echo "Current branch $lbranch is up to date."
     exit 0