Mercurial > hg > soundsoftware-site
changeset 1559:21098b932cb8 feature_1136
Separate out git repo dir and work dir (so as to serve repo dir only)
author | Chris Cannam |
---|---|
date | Thu, 14 Jan 2016 10:27:25 +0000 |
parents | a0c46d6fe7bc |
children | 2c67e414ab46 |
files | extra/soundsoftware/export-git.sh |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/extra/soundsoftware/export-git.sh Thu Jan 14 09:56:38 2016 +0000 +++ b/extra/soundsoftware/export-git.sh Thu Jan 14 10:27:25 2016 +0000 @@ -76,7 +76,9 @@ reponame=$(basename "$hgrepo") authormap="$authordir/authormap_$reponame" - gitrepo="$gitdir/$reponame" + + git_repodir="$gitdir/$reponame" + git_workdir="$gitdir/$reponame.workdir" if [ ! -f "$authormap" ]; then echo "No authormap file was created for repo $reponame, skipping" @@ -93,15 +95,15 @@ continue fi - if [ ! -d "$gitrepo" ]; then - git init "$gitrepo" + if [ ! -d "$git_repodir" ]; then + git init --separate-git-dir="$git_repodir" "$git_workdir" fi echo echo "About to run fast export for repo $reponame..." ( - cd "$gitrepo" + cd "$git_workdir" # Force is necessary because git-fast-import (or git) can't handle # branches having more than one head ("Error: repository has at