{"thread":{"id":"13663","subject":"[PATCH 3/3] Ignore no-op changes in paranoid update hook","startedAt":"2008-05-26T02:18:05Z","lastAt":"2008-05-26T02:18:05Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"77734","messageId":"20080526021805.GC29990@spearce.org","threadId":"13663","inReplyTo":null,"subject":"[PATCH 3/3] Ignore no-op changes in paranoid update hook","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-05-26T02:18:05Z","receivedAt":"2008-05-26T02:18:05Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"If the hook gets invoked with identical old and new ids there\nis no change taking place.  We probably should not have been\ncalled, but instead of failing silently allow the no-op.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n contrib/hooks/update-paranoid |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/hooks/update-paranoid b/contrib/hooks/update-paranoid\nindex ae94822..d18b317 100644\n--- a/contrib/hooks/update-paranoid\n+++ b/contrib/hooks/update-paranoid\n@@ -259,6 +259,7 @@ deny \"Refusing funny ref $ref\" unless $ref =~ s,^refs/,,;\n deny \"Bad old value $old\" unless $old =~ /^[a-z0-9]{40}$/;\n deny \"Bad new value $new\" unless $new =~ /^[a-z0-9]{40}$/;\n deny \"Cannot determine who you are.\" unless $this_user;\n+grant \"No change requested.\" if $old eq $new;\n \n $repository_name = File::Spec->rel2abs($git_dir);\n $repository_name =~ m,/([^/]+)(?:\\.git|/\\.git)$,;\n-- \n1.5.5.1.501.gefb4\n"}]}