auto-fetch mob if it exists
authorPierre Habouzit <madcoder@debian.org>
Thu, 15 Sep 2011 19:38:49 +0000 (21:38 +0200)
committerPierre Habouzit <madcoder@debian.org>
Thu, 15 Sep 2011 19:38:49 +0000 (21:38 +0200)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
+bin/git-up

index 35e0e9d..282eb06 100755 (executable)
@@ -52,7 +52,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