On Sat, 9 Apr 2022 10:48:32 +0200
Kristian Amlie <krist...@amlie.name> wrote:

>On 08.04.2022 22:23, Will Godfrey wrote:
>> On Fri, 8 Apr 2022 18:34:14 +0200
>> Ichthyostega <p...@ichthyostega.de> wrote:
>>   
>>>> On Fri, 8 Apr 2022 17:42:30 +0200 Ichthyostega <p...@ichthyostega.de> 
>>>> wrote:  
>>>>> You can let Git do the hard work ;-)
>>>>>
>>>>> git rev-parse --short=4 <commithash>  
>>>
>>> Am 08.04.22 um 18:20 schrieb Will Godfrey:  
>>>> That's interesting. So if I understand that right it's always going to be
>>>> exactly one commit behind - you can't set it *as* the new hash is being 
>>>> built
>>>> as that would in itself change it!  
>>>
>>>
>>> Ha! Good point.
>>>
>>> What I have noticed is that when projects switch to using the Git hash,
>>> they typically also stop recording the build-number in the commit.
>>> Rather, the Git commit will be read by the build system and just
>>> incorporated into a generated "definitions" header, which is then
>>> used to embed constant strings into the source code or UI definitions.
>>>
>>> -- Hermann  
>> 
>> That all sounds rather convoluted, and I don't see how it provides anything
>> that ordinary users could see and report.  
>
>They would report the commit ID, which can be fed directly into "git 
>describe" to tell you which version it is. Build number is a bit more 
>tricky since you have to find out where in the history it is by looking 
>at the file in each commit. And it can be ambiguous if someone forgets 
>to update it.

As far as I can see, that still leaves it out by one commit. Fine if you know
that is the case, but a user (or potential new code reviewer wouldn't
necessarily realise that.

The engineering firm I used to work for occasionally had safety-critical
contracts. The mantra was always:
Wrong information is far worse than no information.

-- 
Will J Godfrey
https://willgodfrey.bandcamp.com/
http://yoshimi.github.io
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.


_______________________________________________
Yoshimi-devel mailing list
Yoshimi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel

Reply via email to