Re: [PATCH] Allow git-cvsserver database table name prefix to be specified.
- From
Frank Lichtenheld <frank@lichtenheld.de>
- Date
- Mar 18, 2008, 08:09 UTC
- Message-ID
- <20080318080913.GF18624@mail-vs.djpig.de>
- In-Reply-To
- <12058051092735-git-send-email-josh@elsasser.org>
On Mon, Mar 17, 2008 at 06:51:49PM -0700, Josh Elsasser wrote:
Show 7 quoted lines
> Adds a gitcvs.dbprefix config variable, the contents of which are > prepended to any database tables used by git-cvsserver. The same > substutions as gitcvs.dbname and gitcvs.dbuser are supported, and any > non-alphabetic characters are replaced with underscores. > --- > The purpose of this patch is to easily allow a single database (think > PostgreSQL or MySQL) to be shared by multiple repositories.
For the record, I think that this is a good idea, but have no time to really test it.
Show 11 quoted lines
> diff --git a/Documentation/config.txt b/Documentation/config.txt > index 0865f4e..ca232cf 100644 > --- a/Documentation/config.txt > +++ b/Documentation/config.txt > @@ -661,6 +661,13 @@ gitcvs.dbuser, gitcvs.dbpass:: > 'gitcvs.dbuser' supports variable substitution (see > linkgit:git-cvsserver[1] for details). > > +gitcvs.dbprefix:: > + Database table name prefix. This will be prepended to any > + tables used, allowing a single database to be used for deveral
Typo s/deveral/several/
> +gitcvs.dbprefix:: > + Database table name prefix. Supports variable substitution > + (see below). Any non-alphabetic characters will be replaces
Typo s/replaces/replaced/
Show 5 quoted lines
> + with underscores. > + > All variables can also be set per access method, see <<configaccessmethod,above>>. > > Variable substitution
[...]
Show 11 quoted lines
> @@ -2427,10 +2431,10 @@ sub update
> # first lets get the commit list
> $ENV{GIT_DIR} = $self->{git_path};
>
> - my $commitsha1 = `git rev-parse $self->{module}`;
> + my $commitsha1 = `git-rev-parse $self->{module}`;
> chomp $commitsha1;
>
> - my $commitinfo = `git cat-file commit $self->{module} 2>&1`;
> + my $commitinfo = `git-cat-file commit $self->{module} 2>&1`;
> unless ( $commitinfo =~ /tree\s+[a-zA-Z0-9]{40}/ )Unrelated whitespace changes?
Gruesse,
-- Frank Lichtenheld <frank@lichtenheld.de> www: http://www.djpig.de/