Add git-bundle: move objects and references by archive
[gitweb.git] / git-fetch.sh
index ca984e739a595131dca4070982f524d3a53f9637..d5b34bc0e2404c96a1eee2aefd7daa5e5945b07e 100755 (executable)
@@ -377,8 +377,15 @@ fetch_main () {
     ( : subshell because we muck with IFS
       IFS="    $LF"
       (
+       if test -f "$remote" ; then
+           test -n "$shallow_depth" &&
+               die "shallow clone with bundle is not supported"
+           git-bundle unbundle "$remote" $rref ||
+           echo failed "$remote"
+       else
          git-fetch-pack --thin $exec $keep $shallow_depth "$remote" $rref ||
          echo failed "$remote"
+       fi
       ) |
       (
        trap '