Skip to content

Commit

Permalink
fixup! Support 2.25.1 with correct config name
Browse files Browse the repository at this point in the history
  • Loading branch information
timmc-edx committed Dec 21, 2024
1 parent 5000ef5 commit 7f963a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions atlas
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,13 @@ pull_translations() {
# controlled by uploadpack.allowAnySHA1InWant and related configs. (GitHub
# does allow this, though.)
#
# The partialClone config override is needed for git 2.25 and possibly
# later versions (but not in 2.30 and later).
git -c extensions.partialClone=origin fetch \
# The `remote.<name>.promisor` config override is needed for git 2.25 and possibly
# later versions (but not in 2.30 and later). In some versions it might instead
# need to be written as `extensions.partialClone=origin` -- 2.25.1 mentions this
# in its output if a promisor is not set, but doesn't actually *use* that config.
# Probably extensions.partialClone is only used by earlier versions that we don't
# need to support. But it's harmless to set anyhow.
git -c remote.origin.promisor=true -c extensions.partialClone=origin fetch \
$quiet --filter=blob:none --depth=1 origin "${pull_revision:-main}" || exit

# finished "Creating a temporary Git repository to pull translations into <temp dir>..." step
Expand Down
4 changes: 2 additions & 2 deletions spec/pull_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Describe 'Pull with directory param'
git init translations_TEMP
cd translations_TEMP
git remote add origin https://github.com/pull_repository.git
git -c extensions.partialClone=origin fetch --filter=blob:none --depth=1 origin pull_revision
git -c remote.origin.promisor=true -c extensions.partialClone=origin fetch --filter=blob:none --depth=1 origin pull_revision
Done.
Setting git sparse-checkout rules...
git sparse-checkout set --no-cone !* pull_directory/** pull_dir2/** missing_pull_dir/**
Expand Down Expand Up @@ -162,7 +162,7 @@ Describe 'Pull filters'
The output should equal 'git init translations_TEMP
cd translations_TEMP
git remote add origin https://github.com/pull_repository.git
git -c extensions.partialClone=origin fetch --filter=blob:none --depth=1 origin pull_revision
git -c remote.origin.promisor=true -c extensions.partialClone=origin fetch --filter=blob:none --depth=1 origin pull_revision
git sparse-checkout set --no-cone !* pull_directory/**/ar/** pull_directory/**/ar.* pull_directory/**/es_419/** pull_directory/**/es_419.* pull_directory/**/fr_CA/** pull_directory/**/fr_CA.*
git checkout FETCH_HEAD
cd ..'
Expand Down

0 comments on commit 7f963a4

Please sign in to comment.