Re: [PATCH] cvsserver: detect early of we are up to date and avoid costly rev-list
- From
Martin Langhoff <martin.langhoff@gmail.com>
- Date
- Jan 9, 2007, 02:39 UTC
- Message-ID
- <46a038f90701081839r5727c6a0qbcab1cb02dcef580@mail.gmail.com>
- In-Reply-To
- <11683086324018-git-send-email-martin@catalyst.net.nz>
On 1/9/07, Martin Langhoff <martin@catalyst.net.nz> wrote:
Show 10 quoted lines
> @@ -2194,6 +2197,10 @@ sub update
> my $git_log;
> my $lastcommit = $self->_get_prop("last_commit");
>
> + if ($lastcommit eq $commitsha1) { # up-to-date
> + return 1;
> + }
> +
> # Start exclusive lock here...
> $self->{dbh}->begin_work() or die "Cannot lock database for BEGIN";Actually, that generates a warning on the initial checkout. The fix is to run the if as
if (defined $lastcommit && $lastcommit eq $commitsha1) { # up-to-dateJunio -- is it easy for you to fixup when you apply the patch? Otherwise, I'll be happy to repost it patch.
cheers
m