[CRIU] [PATCH 2/2] version: Print git id if present

Cyrill Gorcunov gorcunov at gmail.com
Fri Sep 13 14:13:29 EDT 2013


On Fri, Sep 13, 2013 at 10:50:30AM -0700, Kir Kolyshkin wrote:
> On 09/13/2013 08:35 AM, Cyrill Gorcunov wrote:
> >If criu is built from git repo print git commit id, convenient for debug.
> >
> >For example
> >
> >  | $ ./criu -V
> >  | Version: 0.7
> >  | GitID: 7985251
> 
> 
> You can actually do something like
> 
> VERSION=$(shell git describe --tags HEAD | sed 's/^v//')
> 
> and in case it's a release it will be say 0.7, otherwise
> something like 0.7-18-gd3a7d8f.

I believe this thing should go to plain version instead, while
gitid is supposed to be git commit sha always. Not sure Kir.
I'm fine with either approach I guess, Pavel?

(first patch should be applied anyway, regardless of this one)


More information about the CRIU mailing list