{"thread":{"id":"17790","subject":"[PATCH 1/2] Move 'rev-parse --git-dir' test to t1500","startedAt":"2009-02-14T16:16:28Z","lastAt":"2009-02-15T19:33:51Z","messageCount":3,"participants":["SZEDER Gábor","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"104644","messageId":"1234628189-3635-1-git-send-email-szeder@ira.uka.de","threadId":"17790","inReplyTo":null,"subject":"[PATCH 1/2] Move 'rev-parse --git-dir' test to t1500","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2009-02-14T16:16:28Z","receivedAt":"2009-02-14T16:16:28Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Commit 72183cb2 (Fix gitdir detection when in subdir of\ngitdir, 2009-01-16) added a test to 't1501-worktree' to check the\nbehaviour of 'git rev-parse --git-dir' in a special case.  However,\nt1501 is about testing separate work tree setups, and not about basic\n'rev-parse' functionality, which is tested in t1500-rev-parse.\nTherefore, this patch moves that test to t1500.\n\nSigned-off-by: SZEDER Gábor <szeder@ira.uka.de>\n---\n t/t1500-rev-parse.sh |   11 +++++++++--\n t/t1501-worktree.sh  |    7 -------\n 2 files changed, 9 insertions(+), 9 deletions(-)\n\ndiff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh\nindex 85da4ca..186792e 100755\n--- a/t/t1500-rev-parse.sh\n+++ b/t/t1500-rev-parse.sh\n@@ -26,16 +26,23 @@ test_rev_parse() {\n \t\"test '$1' = \\\"\\$(git rev-parse --show-prefix)\\\"\"\n \tshift\n \t[ $# -eq 0 ] && return\n+\n+\ttest_expect_success \"$name: git-dir\" \\\n+\t\"test '$1' = \\\"\\$(git rev-parse --git-dir)\\\"\"\n+\tshift\n+\t[ $# -eq 0 ] && return\n }\n \n-# label is-bare is-inside-git is-inside-work prefix\n+# label is-bare is-inside-git is-inside-work prefix git-dir\n+\n+ROOT=$(pwd)\n \n test_rev_parse toplevel false false true ''\n \n cd .git || exit 1\n test_rev_parse .git/ false true false ''\n cd objects || exit 1\n-test_rev_parse .git/objects/ false true false ''\n+test_rev_parse .git/objects/ false true false '' \"$ROOT/.git\"\n cd ../.. || exit 1\n \n mkdir -p sub/dir || exit 1\ndiff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh\nindex 27dc6c5..f6a6f83 100755\n--- a/t/t1501-worktree.sh\n+++ b/t/t1501-worktree.sh\n@@ -92,13 +92,6 @@ cd sub/dir || exit 1\n test_rev_parse 'in repo.git/sub/dir' false true true sub/dir/\n cd ../../../.. || exit 1\n \n-test_expect_success 'detecting gitdir when cwd is in a subdir of gitdir' '\n-\t(expected=$(pwd)/repo.git &&\n-\t cd repo.git/refs &&\n-\t unset GIT_DIR &&\n-\t test \"$expected\" = \"$(git rev-parse --git-dir)\")\n-'\n-\n test_expect_success 'repo finds its work tree' '\n \t(cd repo.git &&\n \t : > work/sub/dir/untracked &&\n-- \n1.6.2.rc0.81.g79856\n"},{"id":"104645","messageId":"1234628189-3635-2-git-send-email-szeder@ira.uka.de","threadId":"17790","inReplyTo":"1234628189-3635-1-git-send-email-szeder@ira.uka.de","subject":"[PATCH 2/2] t1500: more 'git rev-parse --git-dir' tests","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2009-02-14T16:16:29Z","receivedAt":"2009-02-14T16:16:29Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Extend t1500 with tests of 'git rev-parse --git-dir' when invoked from\nother directories of the repository or the work tree.\n\nSigned-off-by: SZEDER Gábor <szeder@ira.uka.de>\n---\n\n  In a separate commit to clearly indicate which test was moved and\n  which ones are new.\n\n t/t1500-rev-parse.sh |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh\nindex 186792e..48ee077 100755\n--- a/t/t1500-rev-parse.sh\n+++ b/t/t1500-rev-parse.sh\n@@ -37,17 +37,17 @@ test_rev_parse() {\n \n ROOT=$(pwd)\n \n-test_rev_parse toplevel false false true ''\n+test_rev_parse toplevel false false true '' .git\n \n cd .git || exit 1\n-test_rev_parse .git/ false true false ''\n+test_rev_parse .git/ false true false '' .\n cd objects || exit 1\n test_rev_parse .git/objects/ false true false '' \"$ROOT/.git\"\n cd ../.. || exit 1\n \n mkdir -p sub/dir || exit 1\n cd sub/dir || exit 1\n-test_rev_parse subdirectory false false true sub/dir/\n+test_rev_parse subdirectory false false true sub/dir/ \"$ROOT/.git\"\n cd ../.. || exit 1\n \n git config core.bare true\n-- \n1.6.2.rc0.81.g79856\n"},{"id":"104804","messageId":"7veixzlckg.fsf@gitster.siamese.dyndns.org","threadId":"17790","inReplyTo":"1234628189-3635-2-git-send-email-szeder@ira.uka.de","subject":"Re: [PATCH 2/2] t1500: more 'git rev-parse --git-dir' tests","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-15T19:33:51Z","receivedAt":"2009-02-15T19:33:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks, queued.\n"}]}