diff --git a/Makefile b/Makefile index 7e1d5a7b4..8fa9fdf7e 100644 --- a/Makefile +++ b/Makefile @@ -177,12 +177,12 @@ CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverl LDFLAGS += $(PLATFORM_LDFLAGS) date := $(shell date +%F) -git_sha := $(shell git describe HEAD 2>/dev/null) +git_sha := $(shell git rev-parse HEAD 2>/dev/null) gen_build_version = \ printf '%s\n' \ '\#include "build_version.h"' \ 'const char* rocksdb_build_git_sha = \ - "rocksdb_build_git_sha:$(git_sha)";' \ + "rocksdb_build_git_sha:$(git_sha)";' \ 'const char* rocksdb_build_git_date = \ "rocksdb_build_git_date:$(date)";' \ 'const char* rocksdb_build_compile_date = __DATE__;'