From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: Re: Renaming files with git not all that bad? Date: Thu, 9 Dec 2021 10:00:25 +0100 Message-ID: References: <19fed68e4cabf6148ef8f2d18e852d97@webmail.orcon.net.nz> <87o85qmalx.fsf@igel.home> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eNZ+D0OIDqwli6xI" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4805"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 09 10:02:06 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mvFJW-00011O-7v for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Dec 2021 10:02:06 +0100 Original-Received: from localhost ([::1]:34526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvFJU-0003g9-RP for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Dec 2021 04:02:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvFI4-0002ts-WF for emacs-devel@gnu.org; Thu, 09 Dec 2021 04:00:37 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:35038) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvFHz-0002zF-0V for emacs-devel@gnu.org; Thu, 09 Dec 2021 04:00:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=3zJV9bUNFY9GjyXWdn8oCPdD5eKq3U7kvn5WJLAQg14=; b=pN+jlwgAnnEnsu6qXDZQu3/yEA BYl8w0drwiOu6Ymov76oDsSQ5p9tMBat+wriDA0gvncnSfNODe0wG89yXuD1wa08Ye4oWRAlju9Yw XbNW6ibRqpnxaQIpAHnsHtTTpB6m7x4RdaWTTUdLWrCBSr/14Ezb9W+YhRQEw5fWnLwDgkppcl5KJ 1jMJ9bqZRH8npqh9eOkquy2IfVZo3xS2wbMyYMmOOkHi2Wl8hFfWdmAoBk/P4OVBRmZ1jfE6x5PfC ajKyMAF8VNhYsNoi+ZpJ3/8L+yLNwfCFOR9zDpYO1zreHClktY0/5d+MolfbKenV2cITVWwU3UenA uZnTxYlg==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1mvFHt-0003sT-Kt for emacs-devel@gnu.org; Thu, 09 Dec 2021 10:00:25 +0100 Content-Disposition: inline In-Reply-To: <87o85qmalx.fsf@igel.home> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281463 Archived-At: --eNZ+D0OIDqwli6xI Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 09, 2021 at 09:43:54AM +0100, Andreas Schwab wrote: > On Dez 09 2021, Phil Sainty wrote: [...] > Git doesn't care. The rename detection is always performed on the two > end points of a diff operation, irrespective of the intervening history. That said, rename detection is based on heuristics and shaped by one or more configuration knobs. So it is wise to either understand that heuristics [1] well or to keep rename commits somewhat "isolated" (personally, I tend to not make (biggish) changes in the file(s) I'm renaming in the same commit. YMMV, heuristically, of course. I also have acquired the custom to use "git mv" and friends, be it to remind myself that I'm doing it under VC (and to keep that peripheral eye to whether VC is doing what I think it does). Cheers [1] some similarity measure plus some threshold. There are also rumours of massive renames hitting some limits. --=20 tom=C3=A1s --eNZ+D0OIDqwli6xI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCYbHFogAKCRAFyCz1etHa RjhxAJ0ap3RX8X3AJ/YwXSrtyObwvfYGTQCfW8D9r+Fbe0mzTGl73v0EkuPddc0= =OU8T -----END PGP SIGNATURE----- --eNZ+D0OIDqwli6xI--