summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 041e69c)
raw | patch | inline | side by side (parent: 041e69c)
author | Martin Langhoff <martin@catalyst.net.nz> | |
Tue, 9 Jan 2007 02:10:32 +0000 (15:10 +1300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 9 Jan 2007 05:44:07 +0000 (21:44 -0800) |
if the SHA1 of our head matches the last SHA1 seen in the DB, avoid further
processing.
[jc: an "Oops, please amend" patch rolled in]
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
processing.
[jc: an "Oops, please amend" patch rolled in]
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-cvsserver.perl | patch | blob | history |
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index df395126b86bbed4d8f785e7eccbdb091c3f888b..eb98fa0857cb9e7dffd51ef5bb4a7abc0f6e3411 100755 (executable)
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
# first lets get the commit list
$ENV{GIT_DIR} = $self->{git_path};
- my $commitinfo = `git-cat-file commit $self->{module} 2>&1`;
+ my $commitsha1 = `git rev-parse $self->{module}`;
+ chomp $commitsha1;
+
+ my $commitinfo = `git cat-file commit $self->{module} 2>&1`;
unless ( $commitinfo =~ /tree\s+[a-zA-Z0-9]{40}/ )
{
die("Invalid module '$self->{module}'");
my $git_log;
my $lastcommit = $self->_get_prop("last_commit");
+ if (defined $lastcommit && $lastcommit eq $commitsha1) { # up-to-date
+ return 1;
+ }
+
# Start exclusive lock here...
$self->{dbh}->begin_work() or die "Cannot lock database for BEGIN";