From a4f4ce7fa82e551901c590ff88633f5ce224142e Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 27 Aug 2014 15:30:55 -0400 Subject: [PATCH] Fix annoying "fatal: bad revision '^master'" git error On some buildbots and friends, we don't have remotes as you normally think of them. Provide a fallback for $origin in that case. --- base/version_git.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/base/version_git.sh b/base/version_git.sh index fc94a95c3c88a..8ed4f28e0adc6 100644 --- a/base/version_git.sh +++ b/base/version_git.sh @@ -22,6 +22,9 @@ if [ "$#" = "1" -a "$1" = "NO_GIT" ]; then fi # Collect temporary variables origin=$(git config -l 2>/dev/null | grep 'remote\.\w*\.url.*JuliaLang/julia.git' | sed -n 's/remote\.\([a-zA-Z]*\)\..*/\1\//p') +if [ -z "$origin" ]; then + origin="origin/" +fi last_tag=$(git describe --tags --abbrev=0) git_time=$(git log -1 --pretty=format:%ct)