mirror of
https://github.com/git/git.git
synced 2025-12-23 12:14:22 +01:00
t7004: do not chdir around in the main process
Move down to no-contains subdirectory inside a subshell, just like the previous step that created and used it does. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@@ -2293,24 +2293,26 @@ test_expect_success '--contains combined with --no-contains' '
|
|||||||
# don't recurse down to tags for trees or blobs pointed to by *those*
|
# don't recurse down to tags for trees or blobs pointed to by *those*
|
||||||
# commits.
|
# commits.
|
||||||
test_expect_success 'Does --[no-]contains stop at commits? Yes!' '
|
test_expect_success 'Does --[no-]contains stop at commits? Yes!' '
|
||||||
cd no-contains &&
|
(
|
||||||
blob=$(git rev-parse v0.3:v0.3.t) &&
|
cd no-contains &&
|
||||||
tree=$(git rev-parse v0.3^{tree}) &&
|
blob=$(git rev-parse v0.3:v0.3.t) &&
|
||||||
git tag tag-blob $blob &&
|
tree=$(git rev-parse v0.3^{tree}) &&
|
||||||
git tag tag-tree $tree &&
|
git tag tag-blob $blob &&
|
||||||
git tag --contains v0.3 >actual &&
|
git tag tag-tree $tree &&
|
||||||
cat >expected <<-\EOF &&
|
git tag --contains v0.3 >actual &&
|
||||||
v0.3
|
cat >expected <<-\EOF &&
|
||||||
v0.4
|
v0.3
|
||||||
v0.5
|
v0.4
|
||||||
EOF
|
v0.5
|
||||||
test_cmp expected actual &&
|
EOF
|
||||||
git tag --no-contains v0.3 >actual &&
|
test_cmp expected actual &&
|
||||||
cat >expected <<-\EOF &&
|
git tag --no-contains v0.3 >actual &&
|
||||||
v0.1
|
cat >expected <<-\EOF &&
|
||||||
v0.2
|
v0.1
|
||||||
EOF
|
v0.2
|
||||||
test_cmp expected actual
|
EOF
|
||||||
|
test_cmp expected actual
|
||||||
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'If tag is created then tag message file is unlinked' '
|
test_expect_success 'If tag is created then tag message file is unlinked' '
|
||||||
|
|||||||
Reference in New Issue
Block a user