mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
scalar: add --[no-]src option
Some users have strong aversions to Scalar's opinion that the repository should be in a 'src' directory, even though this creates a clean slate for placing build artifacts in adjacent directories. The new --no-src option allows users to opt out of the default behavior. While adding options, make sure the usage output by 'scalar clone -h' reports the same as the SYNOPSIS line in Documentation/scalar.txt. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
fb7d80edca
commit
4527db8ff8
@@ -180,4 +180,16 @@ test_expect_success 'scalar clone warns when background maintenance fails' '
|
||||
grep "could not turn on maintenance" err
|
||||
'
|
||||
|
||||
test_expect_success '`scalar clone --no-src`' '
|
||||
scalar clone --src "file://$(pwd)/to-clone" with-src &&
|
||||
scalar clone --no-src "file://$(pwd)/to-clone" without-src &&
|
||||
|
||||
test_path_is_dir with-src/src &&
|
||||
test_path_is_missing without-src/src &&
|
||||
|
||||
(cd with-src/src && ls ?*) >with &&
|
||||
(cd without-src && ls ?*) >without &&
|
||||
test_cmp with without
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user