[vlc-commits] [Git][videolan/vlc][master] contrib: AMF: improve sparse checkout
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Fri Feb 23 12:12:11 UTC 2024
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
18d58433 by Steve Lhomme at 2024-02-23T11:27:21+00:00
contrib: AMF: improve sparse checkout
git sparse-checkout was only added in 2.25 (2020) [1]. Older git (1.7+) can
handle a sparse checkout setting the .git/info/sparse-checkout data.
We also clone with --filter=blob:none --no-checkout which downloads less from the host.
[1] https://stackoverflow.com/a/13738951
- - - - -
1 changed file:
- contrib/src/amf/rules.mak
Changes:
=====================================
contrib/src/amf/rules.mak
=====================================
@@ -22,8 +22,8 @@ $(TARBALLS)/AMF-$(AMF_GITVERSION).tar.xz:
rm -rf "$(@:.tar.xz=)"
mkdir "$(@:.tar.xz=)"
# clone the top of the branch and only checkout amf/public/include
- cd "$(@:.tar.xz=)" && git clone -n --depth=1 --filter=tree:0 --branch $(AMF_BRANCH) $(AMF_GITURL) "$(notdir $(@:.tar.xz=))"
- cd "$(@:.tar.xz=)/$(notdir $(@:.tar.xz=))" && git sparse-checkout set --no-cone amf/public/include && git checkout
+ cd "$(@:.tar.xz=)" && git clone -n --depth=1 --filter=blob:none --no-checkout --branch $(AMF_BRANCH) $(AMF_GITURL) "$(notdir $(@:.tar.xz=))"
+ cd "$(@:.tar.xz=)/$(notdir $(@:.tar.xz=))" && git config core.sparseCheckout true && echo "amf/public/include" >> .git/info/sparse-checkout && git checkout
cd "$(@:.tar.xz=)" && tar cJf "$(notdir $(@))" --exclude=$(notdir $(@:.tar.xz=))/.git $(notdir $(@:.tar.xz=))
cd "$(@:.tar.xz=)/$(notdir $(@:.tar.xz=))" && echo "`git rev-parse HEAD` $(@)" > "../tmp.githash"
mv -f -- "$(@:.tar.xz=)/tmp.githash" "$(@:.tar.xz=.githash)"
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/18d58433da9a5a6a855bc355fa7da51a94b28d00
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/18d58433da9a5a6a855bc355fa7da51a94b28d00
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list