summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-05-25 22:18:05 -0400
committerJunio C Hamano <gitster@pobox.com>2008-05-25 20:29:30 -0700
commitfa620f1ac8191fa72e54b8b6acc3e424ecfae26e (patch)
treec402aa188b9154f8da63c7e4990023d72ac9606d
parent50b7b2ee99cb98265f847d91159cb3215c6f2379 (diff)
downloadgit-fa620f1ac8191fa72e54b8b6acc3e424ecfae26e.tar.gz
Ignore no-op changes in paranoid update hook
If the hook gets invoked with identical old and new ids there is no change taking place. We probably should not have been called, but instead of failing silently allow the no-op. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--contrib/hooks/update-paranoid1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/hooks/update-paranoid b/contrib/hooks/update-paranoid
index ae94822cd3..d18b317b2f 100644
--- a/contrib/hooks/update-paranoid
+++ b/contrib/hooks/update-paranoid
@@ -259,6 +259,7 @@ deny "Refusing funny ref $ref" unless $ref =~ s,^refs/,,;
deny "Bad old value $old" unless $old =~ /^[a-z0-9]{40}$/;
deny "Bad new value $new" unless $new =~ /^[a-z0-9]{40}$/;
deny "Cannot determine who you are." unless $this_user;
+grant "No change requested." if $old eq $new;
$repository_name = File::Spec->rel2abs($git_dir);
$repository_name =~ m,/([^/]+)(?:\.git|/\.git)$,;