[x264-devel] [PATCH] Hack for svnversion equivalent on git
Jason Martens
cacepi at gmail.com
Fri Mar 7 07:45:51 CET 2008
On Mar 5, 2008, at 4:14 PM, Pierre d'Herbemont wrote:
> What about using git-describe? That's what they use in git's git...
>
> You'll have to git tag -a a revision of x264 though.
Third time a charm, I think. Pierre's suggestion showed the way. The
tree will have to be tagged for this to work as it should; I've
attached a script to do that (tagit.sh). The script places a tag for
each commit - "svn-#" for the old svn tree and "git-#" for the git
commits.
Still a little ugly with checking for uncommitted mods, but it works.
Uncommited modifications are marked like this:
#define X264_VERSION "git-748M"
#define X264_POINTVER "0.58.git-748"
Local commits (git-describe is polite enough to add part of the commit
hash automatically):
#define X264_VERSION "git-748-1-g100220a"
#define X264_POINTVER "0.58.git-748-1-g100220a"
And successive local commits:
#define X264_VERSION "git-748-2-geb6f131"
#define X264_POINTVER "0.58.git-748-2-geb6f131"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tagit.sh.gz
Type: application/x-gzip
Size: 22968 bytes
Desc: not available
Url : http://mailman.videolan.org/pipermail/x264-devel/attachments/20080307/7cf9da8d/attachment-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: version.sh.diff
Type: application/octet-stream
Size: 745 bytes
Desc: not available
Url : http://mailman.videolan.org/pipermail/x264-devel/attachments/20080307/7cf9da8d/attachment-0001.obj
More information about the x264-devel
mailing list