[llvm] r190778 - Fix the build for git repositories with multiple remotes.
Daniel Sanders
daniel.sanders at imgtec.com
Mon Sep 16 02:25:49 PDT 2013
Author: dsanders
Date: Mon Sep 16 04:25:49 2013
New Revision: 190778
URL: http://llvm.org/viewvc/llvm-project?rev=190778&view=rev
Log:
Fix the build for git repositories with multiple remotes.
Summary:
When a git repository had multiple remotes, ${repository} will be set to a multiline string. This causes compilation errors in SVNVersion.inc.
Fix this by limiting the output of utils/GetRepositoryPath to the first remote (which is reasonably likely to be 'origin').
Reviewers: jordan_rose
CC: llvm-commits, t.p.northover
Differential Revision: http://llvm-reviews.chandlerc.com/D1659
Modified:
llvm/trunk/utils/GetRepositoryPath
Modified: llvm/trunk/utils/GetRepositoryPath
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/GetRepositoryPath?rev=190778&r1=190777&r2=190778&view=diff
==============================================================================
--- llvm/trunk/utils/GetRepositoryPath (original)
+++ llvm/trunk/utils/GetRepositoryPath Mon Sep 16 04:25:49 2013
@@ -19,7 +19,7 @@ if [ -d .svn ]; then
elif [ -f .git/svn/.metadata ]; then
git svn info | grep 'URL:' | cut -d: -f2-
elif [ -d .git ]; then
- git remote -v | grep 'fetch' | awk '{ print $2 }'
+ git remote -v | grep 'fetch' | awk '{ print $2 }' | head -n1
else
exit 1;
fi
More information about the llvm-commits
mailing list