This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11880 - Include git commit ID in version string
Attached to Project:
Rockbox
Opened by sideral (sideral) - Sunday, 16 January 2011, 02:39 GMT+2
Last edited by sideral (sideral) - Friday, 06 May 2011, 10:46 GMT+2
Opened by sideral (sideral) - Sunday, 16 January 2011, 02:39 GMT+2
Last edited by sideral (sideral) - Friday, 06 May 2011, 10:46 GMT+2
|
DetailsBetter version reporting for git-tracked repositories: Include the git commit ID in the version string, much like is done for repos tracked with bzr.
|
This task depends upon
Closed by sideral (sideral)
Friday, 06 May 2011, 10:46 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed as r29827
Friday, 06 May 2011, 10:46 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed as r29827
The version strings generated for builds in git-managed source trees would look like this:
* “r12345-110204” when building a revision committed upstream
* “r12345M-110204” when building a revision committed upstream with local, uncommitted changes (this and the previous strings match the existing behavior)
* “r12345+1a2b3c-110204” when building a locally committed revision based on SVN r12345 (the hex number after the “+” is the abbreviated git commit ID)
* “r12345+1a2b3cM-110204” when building a locally committed revision based on SVN r12345 with local, uncommitted changes.
Only developers who have local commits would ever see the git commit ID. Thus, I don't think the length of the version string presents any usability problem despite the possible truncation of the version display when booting on a device with a very small screen. In my experience, the benefit for the developer when having to answer the question “which build am I running” much outweighs this minor nuisance.
However, if people see this as a major problem, we could abbreviate the commit ID even more, to (say) 3 characters. Given that local branches likely won't divert too far off the SVN revision reported in the version number, few characters are needed to uniquely identify the commit that was actually built.