scalar: teach 'clone' to support the --single-branch option
Just like `git clone`, the `scalar clone` command now also offers to restrict the clone to a single branch. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
546f822d53
commit
4368e40bef
@ -45,13 +45,17 @@ test_expect_success 'set up repository to clone' '
|
||||
|
||||
test_expect_success 'scalar clone' '
|
||||
second=$(git rev-parse --verify second:second.t) &&
|
||||
scalar clone "file://$(pwd)" cloned &&
|
||||
scalar clone "file://$(pwd)" cloned --single-branch &&
|
||||
(
|
||||
cd cloned/src &&
|
||||
|
||||
git config --get --global --fixed-value maintenance.repo \
|
||||
"$(pwd)" &&
|
||||
|
||||
git for-each-ref --format="%(refname)" refs/remotes/origin/ >actual &&
|
||||
echo "refs/remotes/origin/parallel" >expect &&
|
||||
test_cmp expect actual &&
|
||||
|
||||
test_path_is_missing 1/2 &&
|
||||
test_must_fail git rev-list --missing=print $second &&
|
||||
git rev-list $second &&
|
||||
|
Reference in New Issue
Block a user