public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Add support for gcc as git submodule of another repository.
@ 2018-04-30 23:35 Jim Wilson
  2018-05-01 22:33 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Wilson @ 2018-04-30 23:35 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jim Wilson

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(-)

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
-- 
2.14.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Add support for gcc as git submodule of another repository.
  2018-04-30 23:35 [PATCH] Add support for gcc as git submodule of another repository Jim Wilson
@ 2018-05-01 22:33 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2018-05-01 22:33 UTC (permalink / raw)
  To: Jim Wilson, gcc-patches

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-01 22:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-30 23:35 [PATCH] Add support for gcc as git submodule of another repository Jim Wilson
2018-05-01 22:33 ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).