Resolving git-lfs pointers in android-16.0.0

117 views
Skip to first unread message

Michael Devine

unread,
Jul 7, 2025, 2:21:19 PMJul 7
to Repo and Gerrit Discussion
The new AOSP major release android-16.0.0_r1 has at least one use of git-lfs, but I can't find any corresponding configuration for git-lfs in that repository branch. I'm expecting to find a .gitattributes file (to track while files use LFS) and a .lfsconfig file (to indicate where the LFS contents are stored).

Is this intended? Am I missing some configuration somewhere? What is the right way to resolve the LFS contents for this file and any others that may exist?

Yingchun Li

unread,
Jul 8, 2025, 5:14:11 AMJul 8
to Repo and Gerrit Discussion
On Tuesday, July 8, 2025 at 2:21:19 AM UTC+8 Michael Devine wrote:
The new AOSP major release android-16.0.0_r1 has at least one use of git-lfs, but I can't find any corresponding configuration for git-lfs in that repository branch. I'm expecting to find a .gitattributes file (to track while files use LFS) and a .lfsconfig file (to indicate where the LFS contents are stored).

Is this intended? Am I missing some configuration somewhere? What is the right way to resolve the LFS contents for this file and any others that may exist?
repo init xxx --git-lfs 
should checkout the real content of lfs. 

Michael Devine

unread,
Jul 9, 2025, 12:52:22 PMJul 9
to Repo and Gerrit Discussion
That doesn't seem to be the case. I suspect that --git-lfs would work if there were proper LFS configuration, including .lfsconfig and .gitattributes, but I don't see how git-repo would resolve a pointer file without those configuration files.

$ repo init --manifest-url=https://android.googlesource.com/platform/manifest --manifest-branch=android-16.0.0_r1 --repo-url=<personal git-repo repository> --repo-rev="v2.54" --git-lfs --no-clone-bundle
$ repo sync
$ cat external/rust/android-crates-io/crates/android_bp/src/test_db.tar.xz
version https://git-lfs.github.com/spec/v1
oid sha256:faa09385f32d8b3e4518c14384b52ef94f6430da5a838307a2e0af2940b89608
size 1803816


Yingchun Li

unread,
Jul 10, 2025, 1:43:11 AMJul 10
to Repo and Gerrit Discussion
On Thursday, July 10, 2025 at 12:52:22 AM UTC+8 Michael Devine wrote:
That doesn't seem to be the case. I suspect that --git-lfs would work if there were proper LFS configuration, including .lfsconfig and .gitattributes, but I don't see how git-repo would resolve a pointer file without those configuration files.

$ repo init --manifest-url=https://android.googlesource.com/platform/manifest --manifest-branch=android-16.0.0_r1 --repo-url=<personal git-repo repository> --repo-rev="v2.54" --git-lfs --no-clone-bundle
$ repo sync
$ cat external/rust/android-crates-io/crates/android_bp/src/test_db.tar.xz
Yes, that's strange, I also clone this repo and using `git lfs pull`, still cannot checkout the real content.
Maybe they didn't upload the real content to their lfs server.

Michael Devine

unread,
Jul 10, 2025, 12:38:14 PMJul 10
to Repo and Gerrit Discussion
Thanks for trying this out Yingchun!

I think there's a deeper problem: they haven't told us where the LFS server is. Even if they have an LFS server, and they put the file on the server, if there isn't a .lfsconfig file, git-lfs won't be able to find it and fetch from it.
Reply all
Reply to author
Forward
0 new messages