From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 3CC031F5FB for ; Mon, 27 Feb 2017 13:39:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751424AbdB0NjG (ORCPT ); Mon, 27 Feb 2017 08:39:06 -0500 Received: from mout.web.de ([212.227.17.11]:59417 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751030AbdB0NjD (ORCPT ); Mon, 27 Feb 2017 08:39:03 -0500 Received: from [192.168.178.36] ([79.237.49.102]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lk8t4-1cC1gk2evi-00c9tA; Mon, 27 Feb 2017 14:29:24 +0100 Subject: Re: SHA1 collisions found To: "brian m. carlson" References: <20170223164306.spg2avxzukkggrpb@kitenet.net> <20170225190410.anvb7ll7tlhwgm3t@genre.crustytoothpaste.net> Cc: Duy Nguyen , Joey Hess , Git Mailing List From: =?UTF-8?Q?Ren=c3=a9_Scharfe?= Message-ID: <13bb2033-fedd-d7da-f584-21a3142852d3@web.de> Date: Mon, 27 Feb 2017 14:29:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20170225190410.anvb7ll7tlhwgm3t@genre.crustytoothpaste.net> Content-Type: text/plain; charset=windows-1252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xJAaz+or5erq+8kflVE4rA60mVavZa77N/inQecA8qQ YW1tUUn Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Am 25.02.2017 um 20:04 schrieb brian m. carlson: >>> So I think that the current scope left is best estimated by the >>> following command: >>> >>> git grep -P 'unsigned char\s+(\*|.*20)' | grep -v '^Documentation' >>> >>> So there are approximately 1200 call sites left, which is quite a bit of >>> work. I estimate between the work I've done and other people's >>> refactoring work (such as the refs backend refactor), we're about 40% >>> done. > > As a note, I've been working on this pretty much nonstop since the > collision announcement was made. After another 27 commits, I've got it > down from 1244 to 1119. > > I plan to send another series out sometime after the existing series has > hit next. People who are interested can follow the object-id-part* > branches at https://github.com/bk2204/git. Perhaps the following script can help a bit; it converts local and static variables in specified files. It's just a simplistic parser which can get at least shadowing variables, strings and comments wrong, so its results need to be reviewed carefully. I failed to come up with an equivalent Coccinelle patch so far. :-/ René #!/bin/sh while test $# -gt 0 do file="$1" tmp="$file.new" test -f "$file" && perl -e ' use strict; my %indent; my %old; my %new; my $in_struct = 0; while (<>) { if (/^(\s*)}/) { my $len = length $1; foreach my $key (keys %indent) { if ($len < length($indent{$key})) { delete $indent{$key}; delete $old{$key}; delete $new{$key}; } } $in_struct = 0; } if (!$in_struct and /^(\s*)(static )?unsigned char (\w+)\[20\];$/) { my $prefix = "$1$2"; my $name = $3; $indent{$.} = $1; $old{$.} = qr/(?)(?"$tmp" && mv "$tmp" "$file" || exit 1 shift done