Upgrade guide 2.9 to 3.0 typo
Created by: iszak
It appears that the sed command in the migration guide for 2.9 to 3.0 causes the .gitolite.rc config key to be malformed and thus breaks new repositories and possibly other side effects. As an example you can see it with
> echo '$GL_GITCONFIG_KEYS="";' | sed 's/\(GL_GITCONFIG_KEYS\s*=>*\s*\).\{2\}/"\.\*"/g'
> $".*";
The problem is the replacement pattern is missing the back reference to the group. If we change it to;
> echo '$GL_GITCONFIG_KEYS="";' | sed 's/\(GL_GITCONFIG_KEYS\s*=>*\s*\).\{2\}/\1"\.\*"/g'
> $GL_GITCONFIG_KEYS=".*";
It works as expected, so to use the same command in the wiki it should be;
sudo -u git -H sed -i "s/\(GIT_CONFIG_KEYS\s*=>*\s*\).\{2\}/\1'\.\*'/g" /home/git/.gitolite.rc
and for v2 of Gitolite
sudo -u git -H sed -i 's/\(GL_GITCONFIG_KEYS\s*=>*\s*\).\{2\}/\1"\.\*"/g' /home/git/.gitolite.rc
My apologies if this isn't the correct means for submitting a correction to the wiki.