From 13a492bdd510702047b5cfc11e96ad549991420d Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 18 May 2009 14:49:56 +0200 Subject: [PATCH] Teach share/msysGit/initialize.sh about submodules Signed-off-by: Johannes Schindelin --- share/msysGit/initialize.sh | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) rewrite share/msysGit/initialize.sh (74%) diff --git a/share/msysGit/initialize.sh b/share/msysGit/initialize.sh dissimilarity index 74% index c9c5afa5a1..938ae0efc1 100644 --- a/share/msysGit/initialize.sh +++ b/share/msysGit/initialize.sh @@ -1,20 +1,24 @@ -#!/bin/sh - -# This script initializes /.git from msysgit.git on repo.or.cz - -test -d /.git || { - cd / && - git init && - git add bin doc etc lib mingw msys* share .gitignore && - git add $( (cd git && - git ls-files | grep -v "^\"\?gitweb" && - echo gitweb) | - sed "s|^|git/|" ) && - git update-index --add git/config.mak && - git remote add origin git://repo.or.cz/msysgit.git/ && - git fetch && - git gc && - git reset --soft origin/master && - git read-tree -m -u HEAD -} - +#!/bin/sh + +# This script initializes /.git from msysgit.git on repo.or.cz + +test -d /git/.git || { + cd /git && + git init && + git add . && + git commit -m "Current revision" && + git remote add -f origin mob@repo.or.cz:/srv/git/git/mingw/4msysgit.git +} || +exit + + +test -d /.git || { + cd / && + git init && + git ls-files --other --exclude-standard $(sed -n \ + -e 's/^path = /--exclude=/p' < .gitmodules) -z | + git update-index --add --stdin -z && + git commit -m "Current revision" && + git remote add -f origin mob@repo.or.cz:/srv/git/4msysgit.git && + git gc +} -- 2.11.4.GIT