Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <derrickstolee@github.com>2023-08-28 16:52:24 +0300
committerJunio C Hamano <gitster@pobox.com>2023-08-28 19:16:06 +0300
commit4527db8ff8c61b173e4c2533b53d34d019a6f061 (patch)
treef7e25b3502efb39b575b25a0773a818bd2f0dbb5 /t/t9211-scalar-clone.sh
parentfb7d80edcae482f4fa5d4be0227dc3054734e5f3 (diff)
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>
Diffstat (limited to 't/t9211-scalar-clone.sh')
-rwxr-xr-xt/t9211-scalar-clone.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t9211-scalar-clone.sh b/t/t9211-scalar-clone.sh
index 872ad1c9c2..7869f45ee6 100755
--- a/t/t9211-scalar-clone.sh
+++ b/t/t9211-scalar-clone.sh
@@ -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