Skip to contentSkip to conversation

clone: don't clone the info/alternates file

PATCH New Martin Waitz 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clone: don't clone the info/alternates file

Now that the cloned alternates file is parsed, too we don't need to copy it into our new repository, we just reference it.

---

 git-clone.sh |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

4dc26b7a15c0778459f2ccf85aad1c03d1b3a3cc

git-clone.sh +1 -5
index b785247..227245c 100755
@@ -261,11 +261,7 @@ yes,yes)
 	    ;;
 	yes)
 	    mkdir -p "$GIT_DIR/objects/info"
-	    {
-		test -f "$repo/objects/info/alternates" &&
-		cat "$repo/objects/info/alternates";
-		echo "$repo/objects"
-	    } >>"$GIT_DIR/objects/info/alternates"
+	    echo "$repo/objects" >> "$GIT_DIR/objects/info/alternates"
 	    ;;
 	esac
 	git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD"
Signature · 1 line
1.3.1.g6ef7