Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions t/t9007-workspace-nested-translation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ test_expect_success 'repo status bypasses workspace translation at workspace roo
! grep "workspace root:" nested-repo-status.out
'

test_expect_success 'repo status from deep nested path fails as plain repo command' '
if $BIT -C nested/a/b/c repo status > nested-repo-nested.out 2>&1; then
false
else
true
fi &&
grep "Not a git repository" nested-repo-nested.out
# The escape hatch has to work at any depth, not only at the workspace root:
# `bit repo <cmd>` means "skip the implicit translation and run the regular
# command", and a regular command finds its repository by walking up, exactly
# as git does from a subdirectory.
test_expect_success 'repo status from deep nested path also bypasses workspace translation' '
$BIT -C nested/a/b/c repo status > nested-repo-nested.out 2>&1 &&
grep "On branch" nested-repo-nested.out &&
! grep "workspace root:" nested-repo-nested.out
'

test_expect_success 'implicit commit from workspace root performs workspace commit' '
Expand Down
Loading