From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.devel Subject: Re: Renaming files with git not all that bad? Date: Fri, 10 Dec 2021 09:17:10 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yJTeNM2/BwHt3iIa" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23689"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mathias Dahl , Emacs developers , Yuri Khan To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 10 10:26:55 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 1mvcB5-0005x6-Dm for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Dec 2021 10:26:55 +0100 Original-Received: from localhost ([::1]:57312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvcB4-0003oD-3B for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Dec 2021 04:26:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvb5i-0005s0-Eh for emacs-devel@gnu.org; Fri, 10 Dec 2021 03:17:18 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:35092) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvb5e-0002Xn-DU for emacs-devel@gnu.org; Fri, 10 Dec 2021 03:17:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject :Cc:To:From:Date:Sender:Reply-To: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=paer5XtxT/NBf14zMH+QXCeOFLzYsmKX1ICQ2jOu2LY=; b=quknldfAVNKSJBjfuzk76D1xLE Ee623ZWT95Se/FsQafloOQ1y/xU+wliehV3IIqP5TWOH1dQA0GoULMCEHHo0Tnc5NwEiltVN9Td0R E90pzwV4GjD0lnowr5BEIRDwstD4QnuC56gbSFPay9X+X7+7ZS6or7hox0CJRf20TaYsnG1sML7EI Uq89vxL8NnGSouUOPy7Gt029MArNG43tyEPGtW+/vJJGb37FuM+ssnFlhGbNhFoYav+80pqlZabXh l1AWBUiWzRxAV/VUSDFdqW3cjceYObYPXFLmgnhVVONVqE1TKOl8Ish1t4UAuhReb8q//dZnMzTwu 3TNdYHfw==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1mvb5a-0006Y1-4B; Fri, 10 Dec 2021 09:17:10 +0100 Content-Disposition: inline In-Reply-To: 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:281577 Archived-At: --yJTeNM2/BwHt3iIa Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 09, 2021 at 02:18:21PM -0800, Stefan Kangas wrote: > writes: >=20 > > On Thu, Dec 09, 2021 at 03:55:34PM +0100, Stefan Kangas wrote: > >> Yuri Khan writes: > >> > >> > There is also a trick to split a file into multiple parts where each > >> > part retains its history. > >> > >> Thanks, I didn't know about this but will see if I can make it work > >> for the splitting up of image-dired.el. > > > > Based on [1], I once did: [crude git-split code] > Cool! >=20 > I'm not sure about this method, as it seems safer to use a named branch > instead of referring to some SHA1 directly. Maybe that won't make any > difference to git though? It would at least leave some evidence behind, should things go boom :) OTOH you'd want to garbage collect those spurious branches >=20 > It's been over a decade since I last looked into how git stores data in > any detail, but IIRC a branch name is just a pointer to some SHA1 hash > recorded in a text file. More or less. The "active" branches (typically the HEAD, but also the remote branches) are represented by files whithin =2Egit/refs/heads/ (where subdirs are made when the branch name contains slashes, that's why you can't create a branch "foo" whenever you already have a branch "foo/bar" and vice-versa, just think UNIXy ;-) This file just contains the Merkle-tree-ish hash of the source tree, and is updated on commits (thus it "grows"). Tags just stay "in place". In real life, the inactive refs tend to live in "packed-refs", I believe. Cheers --=20 t --yJTeNM2/BwHt3iIa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCYbMM/wAKCRAFyCz1etHa RqE9AJ449Gwe4CsO4L22IR27guC5vvL25QCeKqSoiXF/CstQtwdAhphWddrxnjU= =CSiZ -----END PGP SIGNATURE----- --yJTeNM2/BwHt3iIa--