Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I download a specific version of source code from android.googlesourcecode.com using Git?

I want to download the source code shown in the tags from android.googlesourcecode. For example, I want to download calendar code

https://android.googlesource.com/platform/packages/apps/Calendar

I also want to download the code of android specific version tag. For example,android-4.0.3_r1.1 from the following link

https://android.googlesource.com/platform/packages/apps/Calendar/+/android-4.0.3_r1.1.

When I browse this code from git repositories it doesn't show the tag's version of code. How do I do this?

like image 613
Morya Avatar asked Nov 02 '22 23:11

Morya


1 Answers

All the tags are listed in the Calendar page under All Tags. That page contains android-4.0.3_r1.1.

If you clone the repo and look for that tag, you will find it as well. For example:

C:\prog\git>git clone https://android.googlesource.com/platform/packages/apps/Calendar
Cloning into 'Calendar'...
remote: Counting objects: 80, done
remote: Finding sources: 100% (80/80)
remote: Total 30504 (delta 15730), reused 30504 (delta 15730)
Receiving objects: 100% (30504/30504), 11.16 MiB | 4.61 MiB/s, done.
Resolving deltas: 100% (15730/15730), done.

C:\prog\git>cd Calendar

C:\prog\git\Calendar>git tag|grep 4.0.3
android-4.0.3_r1
android-4.0.3_r1.1
...

From there, a simple git checkout android-4.0.3_r1.1 will allow you to browse the sources for that specific tag.

like image 121
VonC Avatar answered Nov 09 '22 16:11

VonC