[OpenWrt-Devel] SVN to GIT transition
nbd at openwrt.org
Mon Oct 12 14:50:07 EDT 2015
On 2015-10-12 16:47, Javier Domingo Cansino wrote:
> Many people follow current trunk, and we need to have precise version
> information for that when they report a bug. We don't want to regularly
> tag stuff just to keep reported version information up to date.
> This is already done using --dirty. I generates all the information you
> You can generate whatever information you wish. For example, if total
> trazability of the user is what you want:
> base=$(git merge-base github/master HEAD)
> echo $(git describe --tags $base)-$(git log --oneline $base..HEAD | wc
> -l)-$(git log --oneline | head -n1 | cut -c-8)
> That would give you v1.0-rc1-5-gd66a89f-4-9f0e84a -> base tag, commit
> count from the base to the forking commit, hash of that commit, number
> of commits since fork, hash of the commit.
> You could even add a -dirty if you wish to to tell you if that 4th
> commit after the fork has been compiled cleanly or not.
But that assumes a specific remote in the git config pointing towards
the main openwrt repo. If somebody forked the OpenWrt mirror on github,
the appropriate remote will not be present automatically, and the above
approach will fail.
What we have now is robust against that sort of thing.
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel