git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <junkio@cox.net>
Date
Jan 9, 2007, 05:44 UTC
Message-ID
<7vzm8ssqij.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<46a038f90701081839r5727c6a0qbcab1cb02dcef580@mail.gmail.com>
"Martin Langhoff" <martin.langhoff@gmail.com> writes:
Show 19 quoted lines
> On 1/9/07, Martin Langhoff <martin@catalyst.net.nz> wrote:
>> @@ -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 ;-).
Previous: Martin Langhoff
Message 3 of 3 in “cvsserver: detect early of we are up to date and avoid costly rev-list”
  1. cvsserver: detect early of we are up to date and avoid costly rev-listMartin Langhoff, Jan 9, 2007
  2. Martin LanghoffJan 9, 2007
  3. Junio C HamanoJan 9, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.