{"thread":{"id":"31275","subject":"Surprising tag selection by 'git describe --contains'","startedAt":"2012-08-18T00:13:46Z","lastAt":"2012-08-18T00:13:46Z","messageCount":1,"participants":["Ben Hutchings"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"197233","messageId":"1345248826.4986.33.camel@deadeye.wl.decadent.org.uk","threadId":"31275","inReplyTo":"20120817132250.GA28980@kroah.com","subject":"Surprising tag selection by 'git describe --contains'","fromName":"Ben Hutchings","fromEmail":"ben@decadent.org.uk","sentAt":"2012-08-18T00:13:46Z","receivedAt":"2012-08-18T00:13:46Z","isPatch":false,"sender":{"key":"ben@decadent.org.uk","avatar":null},"body":"On Fri, 2012-08-17 at 06:22 -0700, Greg KH wrote:\n> On Fri, Aug 17, 2012 at 09:18:44AM +0200, Daniel Vetter wrote:\n> > On Fri, Aug 17, 2012 at 1:18 AM, Greg KH <gregkh@linuxfoundation.org> wrote:\n> > > On Tue, Aug 14, 2012 at 01:50:11AM -0400, Gregs git-bot wrote:\n> > >> commit: 5ab3633d6907018b0b830a720e877c3884d679c3\n> > >> From: Hunt Xu <mhuntxu@gmail.com>\n> > >> Date: Sun, 1 Jul 2012 03:45:07 +0000\n> > >> Subject: drm/i915: make rc6 in sysfs functions conditional\n> > >>\n> > >> Commit 0136db586c028f71e7cc21cc183064ff0d5919c8 merges rc6 information\n> > >> into the power group. However, when compiled with CONFIG_PM not set,\n> > >> modprobing i915 would taint since power_group_name is defined as NULL.\n> > >>\n> > >> This patch makes these rc6 in sysfs functions conditional upon the\n> > >> definition of the CONFIG_PM macro to avoid the above-mentioned problem.\n> > >>\n> > >> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45181\n> > >> Cc: stable@vger.kernel.org\n> > >> Tested-by: Kris Karas <bugs-a12@moonlit-rail.com>\n> > >> Signed-off-by: Hunt Xu <mhuntxu@gmail.com>\n> > >> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>\n> > >> ---\n> > >>  drivers/gpu/drm/i915/i915_sysfs.c |   12 ++++++++++++\n> > >>  1 files changed, 12 insertions(+), 0 deletions(-)\n> > >\n> > > As commit 0136db586c028f71e7cc21cc183064ff0d5919c8 only first showed up\n> > > in 3.6-rc1, is this patch still needed for the stable tree(s)?\n> > \n> > \n> > My git tag --contains claims it's in 3.5 already.\n> \n> Really?\n> \n> $ git describe --contains 0136db586c028f71e7cc21cc183064ff0d5919c8\n> v3.6-rc1~59^2~56^2~76\n> \n> Do you see something else?\n\n'git describe --contains' seems to choose the containing tag whose tree\nhas the shortest path from the given tree-like.  So, when some branch\nhas relatively few changes after Linus pulls it for release N and before\nhe pulls it for release N+1 *and* he pulls it later in the merge window\nfor release N+1, commits include in v3.N-rc1 can still be closer to\nv3.(N+1)-rc1 because the extra merge commits on the path to v3.N-rc1\noutweigh the extra non-merge commits on the path to v3.(N+1)-rc1.\n\ngit certainly doesn't (and shouldn't) know anything about ordering of\ntag names, but I think that if one of the containing tags is the\nancestor of all the others then 'git describe --contains' should prefer\nto use that.  Or at least, there should be some way to request that\nbehaviour.\n\nFor now, if in doubt, 'git tag --contains' will tell you all the\ncontaining tags.\n\nBen.\n\n> > And people have reported the regressions to prove it ;-)\n> \n> Ok, fair enough, I'll apply it.\n\n-- \nBen Hutchings\nI say we take off; nuke the site from orbit.  It's the only way to be sure.\n"}]}