From patchwork Thu Apr 13 01:56:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Hommey X-Patchwork-Id: 13209705 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A3D2C7619A for ; Thu, 13 Apr 2023 01:56:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229578AbjDMB4z (ORCPT ); Wed, 12 Apr 2023 21:56:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229828AbjDMB4y (ORCPT ); Wed, 12 Apr 2023 21:56:54 -0400 Received: from vuizook.err.no (vuizook.err.no [IPv6:2a02:20c8:2640::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56D82618F for ; Wed, 12 Apr 2023 18:56:52 -0700 (PDT) Received: from [2400:4160:1877:2b00:dfc8:d49:8ec3:6947] (helo=glandium.org) by vuizook.err.no with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1pmmCc-003Cod-0M for git@vger.kernel.org; Thu, 13 Apr 2023 01:56:48 +0000 Received: from glandium by goemon.lan with local (Exim 4.94.2) (envelope-from ) id 1pmmCW-00AnAO-W9 for git@vger.kernel.org; Thu, 13 Apr 2023 10:56:41 +0900 Date: Thu, 13 Apr 2023 10:56:40 +0900 From: Mike Hommey To: git@vger.kernel.org Subject: similarity index vs. whitespaces Message-ID: <20230413015640.h6npzp47tnob7bq2@glandium.org> X-GPG-Fingerprint: 182E 161D 1130 B9FC CD7D B167 E42A A04F A6AA 8C72 MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi, I hit an interesting case of copy-detection "failure" after renaming a python script and changing indentation in it at the same time: git show -C wouldn't detect it as a rename unless I lowered the similarity index significantly. But from a human perspective, the similarity index feels wrong. Here's a small illustrative example: $ git init qux $ cd qux $ cat > qux <