From: J. Bruce Fields Date: Sat, 27 Jan 2007 04:42:46 GMT Subject: Re: finding earliest tags descended from a given commit Message-ID: <20070127044246.GC14205@fieldses.org> In-Reply-To: On Fri, Jan 26, 2007 at 08:34:15PM -0800, Linus Torvalds wrote: > On Fri, 26 Jan 2007, J. Bruce Fields wrote: > > > > Just curious: every now and then somebody will ask me what kernel > > version they need to upgrade to to get some given fix. I can find the > > commit with the given fix easily enough. How do I then find the > > earliest tagged version containing that fix? > > You can name any revision based on the set of tags you have with: > > git name-rev --tags > > which will try to find the "simplest" way to name something by following > one of your tags. That's interesting, I hadn't noticed name-rev before you and Shawn mentioned it. It only finds one name, though. When I tried it just now on my repository what it found was a tag I'd created for an experimental version, which probably wouldn't be what I wanted. (Though it might be, in some situations.) --b.