[mythtv-users] git & wiki

Nick Rout nick.rout at gmail.com
Thu Dec 9 03:11:50 UTC 2010


On Thu, Dec 9, 2010 at 3:03 PM, Ian Kent <raven at themaw.net> wrote:
> On Wed, 2010-12-08 at 11:13 -0500, Jarod Wilson wrote:
>> On Dec 8, 2010, at 10:10 AM, Udo van den Heuvel wrote:
>>
>> > On 2010-12-08 15:07, Ian Kent wrote:
>> >> On Wed, 2010-12-08 at 21:57 +0800, Ian Kent wrote:
>> >>>> E.g.: I still need to find out how to get the git commit number we're at
>> >>>> to adjust the name of the mythtv rpms.
>> >>>
>> >>> git show HEAD | head -1 | awk '{print $2}'
>> >
>> > Hey, thanks!
>>
>> No, ew, there are better ways. See below. :)
>>
>>
>> >>> but that shows the full commit id. You probably only want to use the
>> >>> first 8 digits of that.
>> >
>> > No problem.  `cut` can fix that, maybe other tricks can help here, too.
>>
>> git describe | cut -d- -f 3
>
> Ha, cool, never used that before!
>
>>
>> >>> Other git tools get things right when the first
>> >>> 8 digits is provided and there hasn't been any time that I have tried to
>> >>> use just the first 8 digits that has not returned the commit I was
>> >>> after.
>> >
>> > OK, that is helpful info!
>>
>> git describe gives you a minimal hash that is guaranteed to be unique.
>> If more than 8 characters are needed, it'll give 'em to you.
>
> But won't a variable length commit number cause havoc with things like
> rpm version comparisons. I guess there's a need to ensure that the
> version string components used allow for a previous component that is
> always increasing.

mythbuntu is now numbering by date yyyymmdd then a hash number, eg:

mythtv-common-0.24.0+fixes.20101208.3e9463e-0ubuntu0mythbuntu1


More information about the mythtv-users mailing list