How to check in log about 'git rev-parse HEAD'
-
I added below in .pro, and I want to check GIT_TAG in log via LogFilter.
But it is not working, what should I do?GIT_TAG = $$system(git rev-parse HEAD)
GIT_SUBMISSION = $$system(git describe --abbrev=0 --tags)DEFINES += GIT_TAG=\"$$GIT_TAG\"
DEFINES += GIT_SUBMISSION=\"$$GIT_SUBMISSION\" -
I added below in .pro, and I want to check GIT_TAG in log via LogFilter.
But it is not working, what should I do?GIT_TAG = $$system(git rev-parse HEAD)
GIT_SUBMISSION = $$system(git describe --abbrev=0 --tags)DEFINES += GIT_TAG=\"$$GIT_TAG\"
DEFINES += GIT_SUBMISSION=\"$$GIT_SUBMISSION\"@kelly said in How to check in log about 'git rev-parse HEAD':
But it is not working
What happens?
Are you sure "git rev-parse HEAD" is called inside your source tree? -
@kelly said in How to check in log about 'git rev-parse HEAD':
But it is not working
What happens?
Are you sure "git rev-parse HEAD" is called inside your source tree? -
@jsulm
Someone just told me that will be worked.
I just want to check recent revision in console.
Is there any way? -
I added below in .pro, and I want to check GIT_TAG in log via LogFilter.
But it is not working, what should I do?GIT_TAG = $$system(git rev-parse HEAD)
GIT_SUBMISSION = $$system(git describe --abbrev=0 --tags)DEFINES += GIT_TAG=\"$$GIT_TAG\"
DEFINES += GIT_SUBMISSION=\"$$GIT_SUBMISSION\"Hi @kelly,
I'm successfully using the following snippet in my projects:
SHA1 = $$system(git rev-parse --short=8 HEAD) DEFINES += "GITSHA1=\\\"$$SHA1\\\""
The main difference to your snippet is the quoting of the defines line. You might want to check that.
Regards