Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] cvsserver: detect early of we are up to date and avoid costly rev-list

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:48

"Martin Langhoff" [off-list ref] writes:
On 1/9/07, Martin Langhoff [off-list ref] wrote:
quoted
@@ -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-date

Junio -- is it easy for you to fixup  when you apply the patch?
Otherwise, I'll be happy to repost it patch.
Thanks but no need.  "git commit --amend" is our friend ;-).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help