diff mbox series

Backport: Add support for gcc as git submodule of another repository.

Message ID 82793a9f-230a-6809-0354-91497e6265d6@arm.com
State New
Headers show
Series Backport: Add support for gcc as git submodule of another repository. | expand

Commit Message

Richard Earnshaw (lists) Jan. 15, 2020, 10:30 a.m. UTC
This is a straight backport of 
https://gcc.gnu.org/ml/gcc-patches/2018-04/msg01352.html.  Without this 
contrib/gcc_update fails if run from a worktree, while git pull works 
just fine.

Pushed to the gcc-8 branch.
diff mbox series

Patch

diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 039dc251ebb..47ac7c47dcc 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,10 @@ 
+2020-01-15  Richard Earnshaw  <rearnsha@arm.com>
+
+	Backport:
+	2018-05-01  Jim Wilson  <jimw@sifive.com>
+
+	* gcc_update: Check for .git as a file.
+
 2019-08-16  Uros Bizjak  <ubizjak@gmail.com>
 
 	* test_summary: Do not escape "=".
diff --git a/contrib/gcc_update b/contrib/gcc_update
index a33bb543902..c9c71548f53 100755
--- a/contrib/gcc_update
+++ b/contrib/gcc_update
@@ -286,7 +286,7 @@  p
 esac
 
 # Check for known version control systems.
-if [ -d .git ]; then
+if [ -d .git ] || [ -f .git ]; then
     GCC_GIT=${GCC_GIT-${GIT-git}}
     vcs_type="git"
 elif [ -d .hg ]; then