Surprising tag selection by 'git describe --contains'
Quoted 28 lines · Greg KH
Quoted 27 lines · Daniel Vetter
Quoted 24 lines · Greg KH
Quoted 12 lines · Gregs git-bot
commit:
5ab3633d6907018b0b830a720e877c3884d679c3
From: Hunt Xu <[email protected]>
Date: Sun, 1 Jul 2012 03:45:07 +0000
Subject: drm/i915: make rc6 in sysfs functions conditionalCommit
0136db586c028f71e7cc21cc183064ff0d5919c8merges rc6 information into the power group. However, when compiled withCONFIG_PMnot set, modprobing i915 would taint sincepower_group_nameis defined as NULL.This patch makes these rc6 in sysfs functions conditional upon the definition of the
CONFIG_PMmacro to avoid the above-mentioned problem.Quoted 8 lines
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45181
Tested-by Kris Karas <[email protected]>Signed-off-by Hunt Xu <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/i915/i915_sysfs.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)As commit
0136db586c028f71e7cc21cc183064ff0d5919c8only first showed up in 3.6-rc1, is this patch still needed for the stable tree(s)?
Quoted 8 lines
Quoted 1 line
My git tag --contains claims it's in 3.5 already.
Really?
$ git describe --contains 0136db586c028f71e7cc21cc183064ff0d5919c8 v3.6-rc1~59^2~56^2~76Do you see something else?
'git describe --contains' seems to choose the containing tag whose tree has the shortest path from the given tree-like. So, when some branch has relatively few changes after Linus pulls it for release N and before he pulls it for release N+1 *and* he pulls it later in the merge window for release N+1, commits include in v3.N-rc1 can still be closer to v3.(N+1)-rc1 because the extra merge commits on the path to v3.N-rc1 outweigh the extra non-merge commits on the path to v3.(N+1)-rc1.
git certainly doesn't (and shouldn't) know anything about ordering of tag names, but I think that if one of the containing tags is the ancestor of all the others then 'git describe --contains' should prefer to use that. Or at least, there should be some way to request that behaviour.
For now, if in doubt, 'git tag --contains' will tell you all the containing tags.
Ben.
Quoted 3 lines
Quoted 1 line
And people have reported the regressions to prove it ;-)
Ok, fair enough, I'll apply it.
Signature · 2 lines
Ben Hutchings I say we take off; nuke the site from orbit. It's the only way to be sure.