On Wed, Apr 15, 2020 at 10:51:37AM -0700, 'Nick Desaulniers' via Clang Built Linux wrote: > `git describe --contains "$tag" | sed 's/~.*//'` is my trick for > finding the first tag that contained a commit. BTW, this might be a useful tweak: since I have so many tags in my tree beyond just Linus's tags (e.g. from linux-next), I also include "--match 'v*'". My ~/bin/git-contains is: git describe --match 'v*' --contains "$1" | cut -d~ -f1 | cut -d^ -f1 (without this, my "git contains 85dc2c65e6c9" would report "next-20180927") -- Kees Cook