David Hendricks has posted comments on this change. ( https://review.coreboot.org/20263 )
Change subject: util/getrevision.sh: Change version string ......................................................................
Patch Set 1: Code-Review-2
(2 comments)
Just to echo my previous comments from the other patch, I am not sold on this approach. I think it adds needless complexity to the script, has no valuable use case, and actually has negative utility since it makes it difficult to programmatically parse the version string.
The git-fu is kind neat, though.
https://review.coreboot.org/#/c/20263/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/20263/1//COMMIT_MSG@40 PS1, Line 40: 5 commits since last tag in upstream's stable branch: : flashrom v0.9.99-5-stable-e4f6643-dirty on Linux 3.13.0-76-generic (x86_64) : : 3 commits since last tag in upstream's staging branch and : 4 local commits on top of that: : flashrom v0.9.99-3-staging-4-e4f6643 on Linux 3.13.0-76-generic (x86_64) : : 3 commits since last tag in upstream's staging branch and : 4 local commits on top of that, and some local uncommitted changes too: : flashrom v0.9.99-3-staging-4-e4f6643-dirty on Linux 3.13.0-76-generic (x86_64) : : 3 commits since the last tag in an unrelated upstream branch : (e.g., a stable release *branch* such as 0.9.99.x) or local branch: : flashrom v0.9.99-3-e4f6643 on Linux 3.13.0-76-generic (x86_64) Honestly, who cares? If somebody gets on the mailing list and presents this info, what value does it provide?
AFAICT the only interesting part is the sha and "-dirty". I suppose one could make an argument for the branch name, but as you pointed out there's no guarantee that the branches are synchronized so even that info may just be misleading.
https://review.coreboot.org/#/c/20263/1/util/getrevision.sh File util/getrevision.sh:
https://review.coreboot.org/#/c/20263/1/util/getrevision.sh@295 PS1, Line 295: r="$upstream_branch-$r" : r="$cnt_tag2upstream_branch-$r" These can also be merged into a single line, if preferred.