{"thread":{"id":"25248","subject":"[PATCH] t6050 (replace): fix bogus \"fetch branch with replacement\" test","startedAt":"2010-09-26T05:20:18Z","lastAt":"2010-09-26T05:20:18Z","messageCount":1,"participants":["Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"151701","messageId":"20100926052019.13598.5764.chriscool@tuxfamily.org","threadId":"25248","inReplyTo":null,"subject":"[PATCH] t6050 (replace): fix bogus \"fetch branch with replacement\" test","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2010-09-26T05:20:18Z","receivedAt":"2010-09-26T05:20:18Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"The test was missing some \"&&\" at the end of some lines and it\nwas wrong because, as the replacement refs were not fetched,\nthe commits from the parallel branch should not show up. This\nwas found by Elijah Newren.\n\nThis is fixed by checking that after the branch from HASH6 is\nfetched, the commits from the parallel branch don't show up,\nand then by fetching the replacement refs and checking that\nthey do show up afterwards.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n t/t6050-replace.sh |   13 ++++++++++---\n 1 files changed, 10 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t6050-replace.sh b/t/t6050-replace.sh\nindex c907523..95b180f 100755\n--- a/t/t6050-replace.sh\n+++ b/t/t6050-replace.sh\n@@ -205,9 +205,16 @@ test_expect_success 'fetch branch with replacement' '\n      git branch tofetch $HASH6 &&\n      (\n \t  cd clone_dir &&\n-\t  git fetch origin refs/heads/tofetch:refs/heads/parallel3\n-\t  git log --pretty=oneline parallel3 | grep $PARA3\n-\t  git show $PARA3 | grep \"A U Thor\"\n+\t  git fetch origin refs/heads/tofetch:refs/heads/parallel3 &&\n+\t  git log --pretty=oneline parallel3 > output.txt &&\n+\t  ! grep $PARA3 output.txt &&\n+\t  git show $PARA3 > para3.txt &&\n+\t  grep \"A U Thor\" para3.txt &&\n+\t  git fetch origin \"refs/replace/*:refs/replace/*\" &&\n+\t  git log --pretty=oneline parallel3 > output.txt &&\n+\t  grep $PARA3 output.txt &&\n+\t  git show $PARA3 > para3.txt &&\n+\t  grep \"O Thor\" para3.txt\n      )\n '\n \n-- \n1.7.3.256.g00e8a\n"}]}