diff mbox series

Add support for gcc as git submodule of another repository.

Message ID 20180430232014.10312-1-jimw@sifive.com
State New
Headers show
Series Add support for gcc as git submodule of another repository. | expand

Commit Message

Jim Wilson April 30, 2018, 11:20 p.m. UTC
We have some github repos that use git submodule to include other repos,
including gcc.  When git submodule is used, .git is actually a file not a dir,
and contains the path to the modules file in the parent repo's .git dir.  This
patch allows contrib/gcc_update to work in this situation.

OK?

Jim

	contrib/
	* gcc_update: Check for .git as a file.
---
 contrib/gcc_update | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Law May 1, 2018, 10:33 p.m. UTC | #1
On 04/30/2018 05:20 PM, Jim Wilson wrote:
> We have some github repos that use git submodule to include other repos,
> including gcc.  When git submodule is used, .git is actually a file not a dir,
> and contains the path to the modules file in the parent repo's .git dir.  This
> patch allows contrib/gcc_update to work in this situation.
> 
> OK?
> 
> Jim
> 
> 	contrib/
> 	* gcc_update: Check for .git as a file.
OK.
jeff
diff mbox series

Patch

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