{"thread":{"id":"12593","subject":"[PATCH 02/11] Add a test for another combination of --reference","startedAt":"2008-03-08T23:03:59Z","lastAt":"2008-03-08T23:03:59Z","messageCount":1,"participants":["Johan Herland"],"isPatch":true,"patchVersion":1,"patchTotal":11},"messages":[{"id":"71466","messageId":"alpine.LNX.1.00.0803081803580.19665@iabervon.org","threadId":"12593","inReplyTo":null,"subject":"[PATCH 02/11] Add a test for another combination of --reference","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2008-03-08T23:03:59Z","receivedAt":"2008-03-08T23:03:59Z","isPatch":true,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"In this case, the reference repository has some useful loose objects,\nbut not all useful objects, and we make sure that we can find the\nobjects we fetch from the repository we're cloning in the new\nrepository, instead of potentially being distracted by the reference\nrepository.\n\nDoing the wrong thing in a builtin-clone implementation would lead to\nthis looking for an object in the wrong place, not finding it (because\nit's only in the right place), and crashing.\n\nSigned-off-by: Johan Herland <johan@herland.net>\n---\n t/t5700-clone-reference.sh |   21 +++++++++++++++++++++\n 1 files changed, 21 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh\nindex d318780..0c42d9f 100755\n--- a/t/t5700-clone-reference.sh\n+++ b/t/t5700-clone-reference.sh\n@@ -118,4 +118,25 @@ test_expect_success 'cloning with reference being subset of source (-l -s)' \\\n \n cd \"$base_dir\"\n \n+test_expect_success 'preparing alternate repository #1' \\\n+'test_create_repo F && cd F &&\n+echo first > file1 &&\n+git add file1 &&\n+git commit -m initial'\n+\n+cd \"$base_dir\"\n+\n+test_expect_success 'cloning alternate repo #2 and adding changes to repo #1' \\\n+'git clone F G && cd F &&\n+echo second > file2 &&\n+git add file2 &&\n+git commit -m addition'\n+\n+cd \"$base_dir\"\n+\n+test_expect_success 'cloning alternate repo #1, using #2 as reference' \\\n+'git clone --reference G F H'\n+\n+cd \"$base_dir\"\n+\n test_done\n-- \n1.5.4.3.327.g614d7.dirty\n\n"}]}