Re: [PATCH v8 03/23] Makefile: refactor GIT-VERSION-GEN to be reusable
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Nov 25, 2024, 09:03 UTC
- Message-ID
- <Z0Q9RTAbs6tc7LN4@pks.im>
- In-Reply-To
- <xmqqfrnlh2qh.fsf@gitster.g>
On Thu, Nov 21, 2024 at 09:03:50AM +0900, Junio C Hamano wrote:
Show 14 quoted lines
> Patrick Steinhardt <ps@pks.im> writes: > > Yeah, being consistent would be nice indeed. But for now I'd prefer to > > keep this as-is because we'd otherwise change the version schema used by > > CMake builds. In theory we can use 4 numbers here, too, where the fourth > > number would correspond to the `PROJECT_VERSION_TWEAK` CMake variable. > > As I only write vX,Y,Z with three numbers, any fourth number a build > system comes up with has no bit of information. So we could consider > what we use is 3-number scheme, and supply a fixed and meaningless '0' > to whoever wants the fourth number. > > Which is essentially what you are doing with the "split $(echo $V 0 0 0 0) > with 'read A B C D' construct" ;-) I am fine with that as long as > we have a shared understanding documented somewhere.
Yes and no. All of our official releases use three version numbers, that much is true. But our development builds use four numbers, e.g.:
2.47.0.280.g199a5082df1.dirty
The fourth number corresponds to the number of patches applied since the last release, and this is what we use in the context of "git.rc".
I'll add a comment to GIT-VERSION-GEN to explain this.
Patrick