From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from Ishtar.sc.tlinx.org (ishtar.tlinx.org [173.164.175.65]) by sourceware.org (Postfix) with ESMTPS id AB0AD3858D32 for ; Sun, 30 Jul 2023 00:33:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AB0AD3858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tlinx.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tlinx.org Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id 36TNX64A085699; Sat, 29 Jul 2023 16:33:08 -0700 Message-ID: <64C5AFB3.3010508@tlinx.org> Date: Sat, 29 Jul 2023 17:32:51 -0700 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: jhg@acm.org CC: cygwin@cygwin.com, Jim Garrison Subject: Re: Most git executables are hard links to git.exe? References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-16.0 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KHOP_HELO_FCRDNS,SPF_HELO_NONE,TXREP,T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023/07/22 10:35, Jim Garrison via Cygwin wrote: > On 07/22/23 10:33, Adam Dinwoodie wrote: > >> On Fri, 21 Jul 2023 at 22:54, Jim Garrison via Cygwin wrote: >> >>> On 07/21/23 14:52, Brian Inglis wrote: >>> >>>> On 2023-07-21 14:59, Jim Garrison via Cygwin wrote: >>>> >>>>> Git comes with over 100 executables, mostly in /usr/libexec/git-core, >>>>> that all appear to be *hard* links to /bin/git, in both Cygwin and >>>>> Windows. The Windows fsutil command shows they're all hard linked: >>>>> >>> [snip] >>> >>>>> I'm curious to know if there's a specific reason for this implementation >>>>> that would make it the choice over symbolic links. >>>>> The hardlink implementation on windows is very similar to the implementation on linux. I'm pretty sure that utils that want to save on space will look at the inode-number and notice that the hardlinked files all have the same inode-number (windows has a similar concept though it is called something else). On linux, utils that are ignorant of inode numbers, will see hardlinked files as separate files -- just as windows does. The symlink files will break if their targets move (same on lin+win).