1

For Example, i wanted to know which k8 version has the fix for https://github.com/kubernetes/kubernetes/pull/23265/commits

From the commit history it shows that the change has been merged to 'master'

SKS
  • 105
  • 1
  • 8

2 Answers2

4

git describe

git describe is intended for questions like yours.

  • which tag is closest to the commit? (git describe <sha>)
  • which tag contains commit? (git describe <sha> --contains)
  • which branch or annotated tag is closest to the commit? (git describe <sha>--all)

So, which k8 version has the fix for PR 23265 ?

Try these steps:

  1. Copy to the clipboard SHA1 of the only commit of PR 23265: 2d064083001a7a7f7dfc8a5f8f2fc50582449bf6
  2. Clone k8s source: git clone https://github.com/kubernetes/kubernetes/
  3. cd kubernetes
  4. Get the earliest annotated tag that contains commit:
git describe 2d064083001a7a7f7dfc8a5f8f2fc50582449bf6 --contains
v1.4.0-alpha.3~307^2

Voila, at least v1.4.0-alpha.3 contains PR 23265

Yasen
  • 4,241
  • 1
  • 16
  • 25
0

Go to the commit page https://github.com/kubernetes/kubernetes/pull/23265/commits/2d064083001a7a7f7dfc8a5f8f2fc50582449bf6

enter image description here

It's right there in light grey v1.4.0-alpha.3. You can see all the tags from all the versions the commit is in.

Tomas G.
  • 3,784
  • 25
  • 28