{"thread":{"id":"32474","subject":"[PATCH] Use longer alias names in subdirectory tests","startedAt":"2012-12-28T23:03:06Z","lastAt":"2012-12-29T03:42:18Z","messageCount":2,"participants":["Aaron Schrab","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"205622","messageId":"1356735786-24001-1-git-send-email-aaron@schrab.com","threadId":"32474","inReplyTo":null,"subject":"[PATCH] Use longer alias names in subdirectory tests","fromName":"Aaron Schrab","fromEmail":"aaron@schrab.com","sentAt":"2012-12-28T23:03:06Z","receivedAt":"2012-12-28T23:03:06Z","isPatch":true,"sender":{"key":"aaron@schrab.com","avatar":"https://avatars.githubusercontent.com/u/39620?v=4"},"body":"When testing aliases in t/t1020-subdirectory.sh use longer names so that\nthey're less likely to conflict with a git-* command somewhere in the\n$PATH.\n\nI have a git-ss command in my path which prevents the 'ss' alias from\nbeing used.  This command will always fail for git.git, causing the test\nto fail.  Even if the command succeeded, that would be a false success\nfor the test since the alias wasn't actually used.  A longer, more\ndescriptive name will make it much less likely that somebody has a\ncommand in their $PATH which will shadow the alias created for the test.\n\nWhile here, use a longer name for the 'test' alias as well since that is\nalso short and meaningful enough to make it not unlikely that somebody\nwould have a command in their $PATH which will shadow that as well.\n\nSigned-off-by: Aaron Schrab <aaron@schrab.com>\n---\n t/t1020-subdirectory.sh | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh\nindex e23ac0e..1e2945e 100755\n--- a/t/t1020-subdirectory.sh\n+++ b/t/t1020-subdirectory.sh\n@@ -111,19 +111,19 @@ test_expect_success 'read-tree' '\n \n test_expect_success 'alias expansion' '\n \t(\n-\t\tgit config alias.ss status &&\n+\t\tgit config alias.test-status-alias status &&\n \t\tcd dir &&\n \t\tgit status &&\n-\t\tgit ss\n+\t\tgit test-status-alias\n \t)\n '\n \n test_expect_success NOT_MINGW '!alias expansion' '\n \tpwd >expect &&\n \t(\n-\t\tgit config alias.test !pwd &&\n+\t\tgit config alias.test-alias-directory !pwd &&\n \t\tcd dir &&\n-\t\tgit test >../actual\n+\t\tgit test-alias-directory >../actual\n \t) &&\n \ttest_cmp expect actual\n '\n@@ -131,9 +131,9 @@ test_expect_success NOT_MINGW '!alias expansion' '\n test_expect_success 'GIT_PREFIX for !alias' '\n \tprintf \"dir/\" >expect &&\n \t(\n-\t\tgit config alias.test \"!sh -c \\\"printf \\$GIT_PREFIX\\\"\" &&\n+\t\tgit config alias.test-alias-directory \"!sh -c \\\"printf \\$GIT_PREFIX\\\"\" &&\n \t\tcd dir &&\n-\t\tgit test >../actual\n+\t\tgit test-alias-directory >../actual\n \t) &&\n \ttest_cmp expect actual\n '\n-- \n1.8.1.rc3.16.g47d6ba6\n"},{"id":"205633","messageId":"7vsj6pfrs5.fsf@alter.siamese.dyndns.org","threadId":"32474","inReplyTo":"1356735786-24001-1-git-send-email-aaron@schrab.com","subject":"Re: [PATCH] Use longer alias names in subdirectory tests","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-12-29T03:42:18Z","receivedAt":"2012-12-29T03:42:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Aaron Schrab <aaron@schrab.com> writes:\n\n> When testing aliases in t/t1020-subdirectory.sh use longer names so that\n> they're less likely to conflict with a git-* command somewhere in the\n> $PATH.\n\nThanks.\n\nIn the longer term we might want to rethink the way we run the tests\nso that random $PATH the user has has less chance of interacting\nwith our tests (we had a similar topic around completion output\nrecently), but until that happens, I think this is a good change.\n"}]}