Victor Choy
Victor Choy

Reputation: 4246

How to know the release version for a commit in android source?

Now I have a code file/fragment, I can search it through google.

So I know the commit.

For example, https://android.googlesource.com/platform/bionic/+/ad76c85%5E!/

However, I want to get the realase version of aosp of the code to sync locally.
What shoud i do?

Thanks.

Upvotes: 2

Views: 554

Answers (2)

CodeWizard
CodeWizard

Reputation: 142094

Check out in which branches/tags this commit exist.
Usually every release version gets a tag so simply search it using:

git tag --contains <commit>

you can read more about it here and get some other options as well.

Upvotes: 2

user376507
user376507

Reputation: 2066

If you know the commit sha value then you can use "git describe --contains ", this will give you the version in which this commit went in and you can use this version to sync.

Upvotes: 0

Related Questions