WARNING: WE NOW REFUSE TO RUN IF GIT ON THE SERVER IS < 1.6.2

I just got tired of supporting old gits.  Sorry.  Had to happen sooner
or later.

I know you feel upset right now but later you'll thank me.
This commit is contained in:
Sitaram Chamarty 2010-04-19 21:42:42 +05:30
parent fabeedf103
commit 45ecc518f0
3 changed files with 9 additions and 29 deletions

View file

@ -61,32 +61,7 @@ In this document:
## git version dependency ## git version dependency
Here's a workaround for a version dependency that the normal flow of gitolite Gitolite (on the server) now refuses to run if git is not at least 1.6.2.
has.
When you edit your config file to create a new repo, and push the changes to
the server, gitolite creates an empty, bare repo for you. Normally, you're
expected to clone this on the client side, and start working -- make your
first commit(s), then push, etc.
However, cloning an empty repo requires a server side git version that is at
least 1.6.2. Gitolite detects this when creating a repo, and warns you.
The workaround is to use the older (gitosis-style) method on the client:
create an empty repo locally, make a commit or two, set an "origin" remote,
and then push. Something like:
mkdir my-new-project
cd my-new-project
git init
git commit --allow-empty -m 'Initial repository'
# or, if your client side git is too old for --allow-empty, just make some
# files, "git add" them, then "git commit"
git remote add origin git@gitolite-server:my-new-project.git
git push origin master:master
Once this is done, the repo is available for cloning by anyone else in the
normal way, since it's not empty anymore.
## other errors, warnings, notes... ## other errors, warnings, notes...

View file

@ -2,6 +2,11 @@ Major changes to gitolite, master branch only, most recent first, no dates but
the tags can help you position stuff approximately the tags can help you position stuff approximately
[NYD = not yet documented due to lack of time...] [NYD = not yet documented due to lack of time...]
- REFUSE TO RUN ON SERVER GIT < 1.6.2 (do NOT upgrade gitolite to or beyond
this point if you are unable to upgrade git itself to at least 1.6.2)
- "D" must be combined with RW or RW+ (warning: minor backward compat breakage)
- v1.4 - v1.4
- recurse through keydir for pubkeys - recurse through keydir for pubkeys

View file

@ -408,10 +408,10 @@ for my $repo (sort keys %repos) {
} }
} }
warn "\n\t\t***** WARNING *****\n" . die "\n\t\t***** AAARGH! *****\n" .
"\tyour git version is older than 1.6.2\n" . "\tyour git version is older than 1.6.2\n" .
"\tgitolite will work but you MUST read the section on\n" . "\tsince that is now more than one year old, and gitolite needs some of\n" .
"\t\"git version dependency\" in doc/3-faq-tips-etc.mkd\n" "\tthe newer features, please upgrade.\n"
if $git_version < 10602; # that's 1.6.2 to you if $git_version < 10602; # that's 1.6.2 to you
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------