[PATCH] Finish documenting trivial merge rules
[gitweb.git] / git-clone.sh
index bfb8fd628536c5bbb08c9d07c7e93455cd253650..a322a459952cd28055f74b4ff1766407789dadf9 100755 (executable)
@@ -139,7 +139,8 @@ yes,yes)
        then
                HEAD=HEAD
        fi
-       tar Ccf "$repo" - refs $HEAD | tar Cxf "$D/.git" - || exit 1
+       (cd "$repo" && tar cf - refs $HEAD) |
+       (cd "$D/.git" && tar xf -) || exit 1
        ;;
 *)
        case "$repo" in
@@ -152,7 +153,8 @@ yes,yes)
                # Look at objects/info/alternates for rsync -- http will
                # support it natively and git native ones will do it on the
                # remote end.  Not having that file is not a crime.
-               rsync -q "$repo/objects/info/alternates" "$D/.git/TMP_ALT" ||
+               rsync -q "$repo/objects/info/alternates" \
+                       "$D/.git/TMP_ALT" 2>/dev/null ||
                        rm -f "$D/.git/TMP_ALT"
                if test -f "$D/.git/TMP_ALT"
                then