{"thread":{"id":"33256","subject":"[PATCH 0/2] Fix a couple of minor things in pull test","startedAt":"2013-03-22T12:31:46Z","lastAt":"2013-03-28T15:17:21Z","messageCount":8,"participants":["Ramkumar Ramachandra","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"211935","messageId":"1363955508-13368-1-git-send-email-artagnon@gmail.com","threadId":"33256","inReplyTo":null,"subject":"[PATCH 0/2] Fix a couple of minor things in pull test","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-03-22T12:31:46Z","receivedAt":"2013-03-22T12:31:46Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"I just happened to open the file when searching for the right file to\nput my autostash tests.\n\nRamkumar Ramachandra (2):\n  t5520 (pull): update test description\n  t5520 (pull): use test_config where appropriate\n\n t/t5520-pull.sh | 24 ++++++++++--------------\n 1 file changed, 10 insertions(+), 14 deletions(-)\n\n-- \n1.8.2.141.gad203c2.dirty\n"},{"id":"211937","messageId":"1363955508-13368-2-git-send-email-artagnon@gmail.com","threadId":"33256","inReplyTo":"1363955508-13368-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 1/2] t5520 (pull): update test description","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-03-22T12:31:47Z","receivedAt":"2013-03-22T12:31:47Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"d09e79c (git-pull: allow pulling into an empty repository, 2006-11-16)\ncreated the file with the description.  At the time, there were only\ntests to check pulling into an empty repository.  The description was\nnever updated even after more tests, unrelated to the original, were\nadded.  Fix this now.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t5520-pull.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\nindex 35304b4..e5adee8 100755\n--- a/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='pulling into void'\n+test_description='pull basic functionality'\n \n . ./test-lib.sh\n \n-- \n1.8.2.141.gad203c2.dirty\n"},{"id":"211936","messageId":"1363955508-13368-3-git-send-email-artagnon@gmail.com","threadId":"33256","inReplyTo":"1363955508-13368-1-git-send-email-artagnon@gmail.com","subject":"[PATCH 2/2] t5520 (pull): use test_config where appropriate","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-03-22T12:31:48Z","receivedAt":"2013-03-22T12:31:48Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Configuration from test_config does not last beyond the end of the\ncurrent test assertion, making each test easier to think about in\nisolation.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n t/t5520-pull.sh | 22 +++++++++-------------\n 1 file changed, 9 insertions(+), 13 deletions(-)\n\ndiff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\nindex e5adee8..0fe935b 100755\n--- a/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -60,8 +60,8 @@ test_expect_success 'pulling into void does not overwrite untracked files' '\n test_expect_success 'test . as a remote' '\n \n \tgit branch copy master &&\n-\tgit config branch.copy.remote . &&\n-\tgit config branch.copy.merge refs/heads/master &&\n+\ttest_config branch.copy.remote . &&\n+\ttest_config branch.copy.merge refs/heads/master &&\n \techo updated >file &&\n \tgit commit -a -m updated &&\n \tgit checkout copy &&\n@@ -96,8 +96,7 @@ test_expect_success '--rebase' '\n '\n test_expect_success 'pull.rebase' '\n \tgit reset --hard before-rebase &&\n-\tgit config --bool pull.rebase true &&\n-\ttest_when_finished \"git config --unset pull.rebase\" &&\n+\ttest_config pull.rebase true &&\n \tgit pull . copy &&\n \ttest $(git rev-parse HEAD^) = $(git rev-parse copy) &&\n \ttest new = $(git show HEAD:file2)\n@@ -105,8 +104,7 @@ test_expect_success 'pull.rebase' '\n \n test_expect_success 'branch.to-rebase.rebase' '\n \tgit reset --hard before-rebase &&\n-\tgit config --bool branch.to-rebase.rebase true &&\n-\ttest_when_finished \"git config --unset branch.to-rebase.rebase\" &&\n+\ttest_config branch.to-rebase.rebase true &&\n \tgit pull . copy &&\n \ttest $(git rev-parse HEAD^) = $(git rev-parse copy) &&\n \ttest new = $(git show HEAD:file2)\n@@ -114,10 +112,8 @@ test_expect_success 'branch.to-rebase.rebase' '\n \n test_expect_success 'branch.to-rebase.rebase should override pull.rebase' '\n \tgit reset --hard before-rebase &&\n-\tgit config --bool pull.rebase true &&\n-\ttest_when_finished \"git config --unset pull.rebase\" &&\n-\tgit config --bool branch.to-rebase.rebase false &&\n-\ttest_when_finished \"git config --unset branch.to-rebase.rebase\" &&\n+\ttest_config pull.rebase true &&\n+\ttest_config branch.to-rebase.rebase false &&\n \tgit pull . copy &&\n \ttest $(git rev-parse HEAD^) != $(git rev-parse copy) &&\n \ttest new = $(git show HEAD:file2)\n@@ -171,9 +167,9 @@ test_expect_success 'pull --rebase dies early with dirty working directory' '\n \tgit update-ref refs/remotes/me/copy copy^ &&\n \tCOPY=$(git rev-parse --verify me/copy) &&\n \tgit rebase --onto $COPY copy &&\n-\tgit config branch.to-rebase.remote me &&\n-\tgit config branch.to-rebase.merge refs/heads/copy &&\n-\tgit config branch.to-rebase.rebase true &&\n+\ttest_config branch.to-rebase.remote me &&\n+\ttest_config branch.to-rebase.merge refs/heads/copy &&\n+\ttest_config branch.to-rebase.rebase true &&\n \techo dirty >> file &&\n \tgit add file &&\n \ttest_must_fail git pull &&\n-- \n1.8.2.141.gad203c2.dirty\n"},{"id":"212174","messageId":"7v4nfz1ndo.fsf@alter.siamese.dyndns.org","threadId":"33256","inReplyTo":"1363955508-13368-3-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH 2/2] t5520 (pull): use test_config where appropriate","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-03-25T15:59:31Z","receivedAt":"2013-03-25T15:59:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> Configuration from test_config does not last beyond the end of the\n> current test assertion, making each test easier to think about in\n> isolation.\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  t/t5520-pull.sh | 22 +++++++++-------------\n>  1 file changed, 9 insertions(+), 13 deletions(-)\n>\n> diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\n> index e5adee8..0fe935b 100755\n> --- a/t/t5520-pull.sh\n> +++ b/t/t5520-pull.sh\n> @@ -60,8 +60,8 @@ test_expect_success 'pulling into void does not overwrite untracked files' '\n>  test_expect_success 'test . as a remote' '\n>  \n>  \tgit branch copy master &&\n> -\tgit config branch.copy.remote . &&\n> -\tgit config branch.copy.merge refs/heads/master &&\n> +\ttest_config branch.copy.remote . &&\n> +\ttest_config branch.copy.merge refs/heads/master &&\n>  \techo updated >file &&\n>  \tgit commit -a -m updated &&\n>  \tgit checkout copy &&\n\nI am not sure if this makes sense.  The \"copy\" branch this test\npiece creates is used throughout the remainder of the test, and\nthese configuration variables establish a known default for cases\nthe later test checks when these various forms of \"git pull\" command\nomits \"from where\" and \"which branch\".  It feels actively wrong to\ndiscard that information after this test piece is done.\n\n> @@ -96,8 +96,7 @@ test_expect_success '--rebase' '\n>  '\n>  test_expect_success 'pull.rebase' '\n>  \tgit reset --hard before-rebase &&\n> -\tgit config --bool pull.rebase true &&\n> -\ttest_when_finished \"git config --unset pull.rebase\" &&\n> +\ttest_config pull.rebase true &&\n>  \tgit pull . copy &&\n>  \ttest $(git rev-parse HEAD^) = $(git rev-parse copy) &&\n>  \ttest new = $(git show HEAD:file2)\n> @@ -105,8 +104,7 @@ test_expect_success 'pull.rebase' '\n>  \n>  test_expect_success 'branch.to-rebase.rebase' '\n>  \tgit reset --hard before-rebase &&\n> -\tgit config --bool branch.to-rebase.rebase true &&\n> -\ttest_when_finished \"git config --unset branch.to-rebase.rebase\" &&\n> +\ttest_config branch.to-rebase.rebase true &&\n>  \tgit pull . copy &&\n>  \ttest $(git rev-parse HEAD^) = $(git rev-parse copy) &&\n>  \ttest new = $(git show HEAD:file2)\n> @@ -114,10 +112,8 @@ test_expect_success 'branch.to-rebase.rebase' '\n>  \n>  test_expect_success 'branch.to-rebase.rebase should override pull.rebase' '\n>  \tgit reset --hard before-rebase &&\n> -\tgit config --bool pull.rebase true &&\n> -\ttest_when_finished \"git config --unset pull.rebase\" &&\n> -\tgit config --bool branch.to-rebase.rebase false &&\n> -\ttest_when_finished \"git config --unset branch.to-rebase.rebase\" &&\n> +\ttest_config pull.rebase true &&\n> +\ttest_config branch.to-rebase.rebase false &&\n>  \tgit pull . copy &&\n>  \ttest $(git rev-parse HEAD^) != $(git rev-parse copy) &&\n>  \ttest new = $(git show HEAD:file2)\n> @@ -171,9 +167,9 @@ test_expect_success 'pull --rebase dies early with dirty working directory' '\n>  \tgit update-ref refs/remotes/me/copy copy^ &&\n>  \tCOPY=$(git rev-parse --verify me/copy) &&\n>  \tgit rebase --onto $COPY copy &&\n> -\tgit config branch.to-rebase.remote me &&\n> -\tgit config branch.to-rebase.merge refs/heads/copy &&\n> -\tgit config branch.to-rebase.rebase true &&\n> +\ttest_config branch.to-rebase.remote me &&\n> +\ttest_config branch.to-rebase.merge refs/heads/copy &&\n> +\ttest_config branch.to-rebase.rebase true &&\n>  \techo dirty >> file &&\n>  \tgit add file &&\n>  \ttest_must_fail git pull &&\n"},{"id":"212502","messageId":"1364474419-22796-1-git-send-email-artagnon@gmail.com","threadId":"33256","inReplyTo":"7v4nfz1ndo.fsf@alter.siamese.dyndns.org","subject":"[PATCH v2 2/2] t5520 (pull): use test_config where appropriate","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-03-28T12:40:19Z","receivedAt":"2013-03-28T12:40:19Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Configuration from test_config does not last beyond the end of the\ncurrent test assertion, making each test easier to think about in\nisolation.\n\nSigned-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n---\n Removed first hunk, as per Junio's comment.\n\n t/t5520-pull.sh | 18 +++++++-----------\n 1 file changed, 7 insertions(+), 11 deletions(-)\n\ndiff --git a/t/t5520-pull.sh b/t/t5520-pull.sh\nindex e5adee8..87777ea 100755\n--- a/t/t5520-pull.sh\n+++ b/t/t5520-pull.sh\n@@ -96,8 +96,7 @@ test_expect_success '--rebase' '\n '\n test_expect_success 'pull.rebase' '\n \tgit reset --hard before-rebase &&\n-\tgit config --bool pull.rebase true &&\n-\ttest_when_finished \"git config --unset pull.rebase\" &&\n+\ttest_config pull.rebase true &&\n \tgit pull . copy &&\n \ttest $(git rev-parse HEAD^) = $(git rev-parse copy) &&\n \ttest new = $(git show HEAD:file2)\n@@ -105,8 +104,7 @@ test_expect_success 'pull.rebase' '\n \n test_expect_success 'branch.to-rebase.rebase' '\n \tgit reset --hard before-rebase &&\n-\tgit config --bool branch.to-rebase.rebase true &&\n-\ttest_when_finished \"git config --unset branch.to-rebase.rebase\" &&\n+\ttest_config branch.to-rebase.rebase true &&\n \tgit pull . copy &&\n \ttest $(git rev-parse HEAD^) = $(git rev-parse copy) &&\n \ttest new = $(git show HEAD:file2)\n@@ -114,10 +112,8 @@ test_expect_success 'branch.to-rebase.rebase' '\n \n test_expect_success 'branch.to-rebase.rebase should override pull.rebase' '\n \tgit reset --hard before-rebase &&\n-\tgit config --bool pull.rebase true &&\n-\ttest_when_finished \"git config --unset pull.rebase\" &&\n-\tgit config --bool branch.to-rebase.rebase false &&\n-\ttest_when_finished \"git config --unset branch.to-rebase.rebase\" &&\n+\ttest_config pull.rebase true &&\n+\ttest_config branch.to-rebase.rebase false &&\n \tgit pull . copy &&\n \ttest $(git rev-parse HEAD^) != $(git rev-parse copy) &&\n \ttest new = $(git show HEAD:file2)\n@@ -171,9 +167,9 @@ test_expect_success 'pull --rebase dies early with dirty working directory' '\n \tgit update-ref refs/remotes/me/copy copy^ &&\n \tCOPY=$(git rev-parse --verify me/copy) &&\n \tgit rebase --onto $COPY copy &&\n-\tgit config branch.to-rebase.remote me &&\n-\tgit config branch.to-rebase.merge refs/heads/copy &&\n-\tgit config branch.to-rebase.rebase true &&\n+\ttest_config branch.to-rebase.remote me &&\n+\ttest_config branch.to-rebase.merge refs/heads/copy &&\n+\ttest_config branch.to-rebase.rebase true &&\n \techo dirty >> file &&\n \tgit add file &&\n \ttest_must_fail git pull &&\n-- \n1.8.2.141.g07926c6\n"},{"id":"212522","messageId":"7vy5d7wpbi.fsf@alter.siamese.dyndns.org","threadId":"33256","inReplyTo":"1364474419-22796-1-git-send-email-artagnon@gmail.com","subject":"Re: [PATCH v2 2/2] t5520 (pull): use test_config where appropriate","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-03-28T14:50:57Z","receivedAt":"2013-03-28T14:50:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n> Configuration from test_config does not last beyond the end of the\n> current test assertion, making each test easier to think about in\n> isolation.\n>\n> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n> ---\n>  Removed first hunk, as per Junio's comment.\n\nThanks, but doesn't yd/use-test-config-unconfig topic already\naddress this?\n"},{"id":"212524","messageId":"CALkWK0=wCza1iL8AybrJqj6A4XfwP024PXi3s1jU7HhmAAjngw@mail.gmail.com","threadId":"33256","inReplyTo":"7vy5d7wpbi.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH v2 2/2] t5520 (pull): use test_config where appropriate","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-03-28T14:57:43Z","receivedAt":"2013-03-28T14:57:43Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Junio C Hamano wrote:\n> Thanks, but doesn't yd/use-test-config-unconfig topic already\n> address this?\n\nJust saw it.  9d6aa64 is identical to my patch, but misses the fourth hunk.\n"},{"id":"212526","messageId":"7vli97wo3i.fsf@alter.siamese.dyndns.org","threadId":"33256","inReplyTo":"7vy5d7wpbi.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH v2 2/2] t5520 (pull): use test_config where appropriate","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-03-28T15:17:21Z","receivedAt":"2013-03-28T15:17:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Ramkumar Ramachandra <artagnon@gmail.com> writes:\n>\n>> Configuration from test_config does not last beyond the end of the\n>> current test assertion, making each test easier to think about in\n>> isolation.\n>>\n>> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>\n>> ---\n>>  Removed first hunk, as per Junio's comment.\n>\n> Thanks, but doesn't yd/use-test-config-unconfig topic already\n> address this?\n\nThe last hunk from your version was missing from 9d6aa64dc32b\n(t5520: use test_config to set/unset git config variables,\n2013-03-24); I'll pick that part and apply as a follow up to the\nseries.\n\nNo need to resend; thanks.\n"}]}