Skip to contentSkip to conversation

clone: keep --reference even with -l -s

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clone: keep --reference even with -l -s

Both -l -s and --reference update objects/info/alternates and used to write over each other.

---

 git-clone.sh               |    2 +
 t/t5700-clone-reference.sh |   78 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+), 1 deletions(-)
 create mode 100755 t/t5700-clone-reference.sh

3410837e34357d43a38a170691ca45f8f3a82221

git-clone.sh +1 -1
index 0805168..b785247 100755
@@ -265,7 +265,7 @@ yes,yes)
 		test -f "$repo/objects/info/alternates" &&
 		cat "$repo/objects/info/alternates";
 		echo "$repo/objects"
-	    } >"$GIT_DIR/objects/info/alternates"
+	    } >>"$GIT_DIR/objects/info/alternates"
 	    ;;
 	esac
 	git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD"
t/t5700-clone-reference.sh new file +78 -0

78 lines not on this page · raw message

Signature · 1 line
1.3.1.g6ef7