Skip to contentSkip to conversation

perf tools: Make --version show kernel version instead of pull req tag

tip:perf/urgent tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Jun 6, 2012 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  aa5cdd308ddbb08959534be408eba8ef040b5989
Gitweb:     http://git.kernel.org/tip/aa5cdd308ddbb08959534be408eba8ef040b5989
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Thu, 31 May 2012 11:17:34 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 31 May 2012 11:20:59 -0300

perf tools: Make --version show kernel version instead of pull req tag

Before:

  $ perf --version
  perf version perf.urgent.for.mingo.5.g37da28

After:

  $ perf --version
  perf version 3.4.8941.g37da28.dirty
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
---
 tools/perf/util/PERF-VERSION-GEN |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/PERF-VERSION-GEN +1 -1
index ad73300..95264f3 100755
@@ -12,7 +12,7 @@ LF='
 # First check if there is a .git to get the version from git describe
 # otherwise try to get the version from the kernel makefile
 if test -d ../../.git -o -f ../../.git &&
-	VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
+	VN=$(git describe --match 'v[0-9].[0-9]*' --abbrev=4 HEAD 2>/dev/null) &&
 	case "$VN" in
 	*$LF*) (exit 1) ;;
 	v[0-9]*)