]> gitweb.fluxo.info Git - utils-git.git/commitdiff
Fetch first at git-update-superproject git-checkout-branch
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 30 Nov 2017 16:42:10 +0000 (14:42 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 30 Nov 2017 16:42:10 +0000 (14:42 -0200)
git-checkout-branch
git-update-superproject

index f9516d42c48643a3ee6a267a1f76226060bb769a..249ce93ec36b37c6bf7e5fb773536552a6aeb473 100755 (executable)
@@ -26,6 +26,9 @@ BASENAME="`basename $0`"
 
 # Checkout the branch containing a commit
 function checkout_branch {
+  # Fetch from all repositories
+  git fetch --all
+
   # Check if we are in a detached HEAD
   if git branch | grep -q '* (HEAD detached'; then
     # Determine the commit we're in
index 0e49a017f78796578aa7a1a08fdfffe77f62adc8..75ad999ec074b84c603ebf6838c6cb76e867a2d0 100755 (executable)
@@ -13,6 +13,7 @@ if [ ! -e ".git" ]; then
 fi
 
 # Run
+git fetch --all
 git pull $* || exit 1
 git submodule sync   --recursive
 git submodule update --recursive --init