LWN.net Logo

Finding a patch's kernel version with git

Finding a patch's kernel version with git

Posted Jun 21, 2010 12:11 UTC (Mon) by farnz (guest, #17727)
In reply to: Finding a patch's kernel version with git by marcH
Parent article: Finding a patch's kernel version with git

The problem is that because revision numbers are not per-branch in most CVCSes (CVS is one exception), it's far too easy to accidentally compare revision numbers in different branches, without realising that that's what you've done. You're never going to stop people throwing around branchless revision numbers (whether they be SVN repository versions, or git SHA tags), because they're a convenient shorthand and happen to work just fine most of the time.

Further, because it's "obvious" that r176594 came after r176593, it's all too easy to assume that whatever changed in r176593 is also changed in r176594. This isn't a safe assumption in a world with branches, but in a CVCS world, you normally get away without explicitly stating which branch a revision is on. Same applies in the DVCS world, but because there's no "obvious" order to DVCS commit IDs, people don't make assumptions when they see a bare revision number; they'll check one way or another.

The painfully long explanation is simply because you refused to believe that people did this sort of thing when I presented it without explanation. Now I've added an explanation, you're complaining that it's unrealistic because I've had to tell you in great detail just how it happens, since you didn't believe that it did happen at all unless you had it explained in great detail?!? Oh, and your initial example didn't include branch names as part of the revision ID, either; if you really expect that developers don't use bare revision IDs, but use the combination of branch name and revision ID, why didn't your example include them?


(Log in to post comments)

Finding a patch's kernel version with git

Posted Jun 21, 2010 16:12 UTC (Mon) by marcH (subscriber, #57642) [Link]

> 1. it's far too easy to accidentally compare revision numbers in different branches, without realising that that's what you've done.
> [...]
> 2. branchless revision numbers happen to work just fine most of the time.

If you cannot see the contradiction above then there is not much that can be done.

> The painfully long explanation is simply because you refused to believe that people did this sort of thing when I presented it without explanation.

The only reason your explanation is long is because it has to enumerate an unlikely long chain of mistakes, oversights and clueless SVN users. Or are you seriously saying such branch confusion happens often at your place? And yet you are still using branchless numbers? Hard to believe.

I asked for more detail because your first "explanation" was just: "thanks to human error, the developer forgot to ensure that the fix was present on TRUNK". This did not explain anything.

> and your initial example didn't include branch names as part of the revision ID, either;[...] why didn't your example include them?

Because you were supposed to read the entire post, not just the beginning of it. OK: this second post of mine sucked. Believe it or not, but I am glad you pushed me in clarifying the whole thing.

Finding a patch's kernel version with git

Posted Jun 21, 2010 16:43 UTC (Mon) by bronson (subscriber, #4806) [Link]

> If you cannot see the contradiction above then there is not much that can be done.

Obviously he sees the contradiction -- he pointed it out. "You're never going to stop people throwing around branchless revision numbers" means that until 'svn st' includes the branch name so people will copy-n-paste both into an email in one swipe, svn users will tend to use branchless revision numbers even when they know better.

You both are doing a great job of slinging insults and quote mining, making very little forward progress on what is ultimately an absurdly simple concept.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds