From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.jhmg.net (smtp.jhmg.net [147.182.185.113]) by sourceware.org (Postfix) with ESMTPS id 927FD3853D10 for ; Fri, 21 Jul 2023 20:59:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 927FD3853D10 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=jhmg.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jhmg.net Received: from [192.168.10.7] (c-24-21-153-184.hsd1.or.comcast.net [24.21.153.184]) (Authenticated sender: jhg) by smtp.jhmg.net (Postfix) with ESMTPSA id 47C506087F for ; Fri, 21 Jul 2023 20:59:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=jhmg.net; s=smtp; t=1689973181; bh=HrVTU9ZVfD6cbufHdPSrxTS6LbdV2ufvPX2HuWgIpSM=; h=Date:Reply-To:To:From:Subject:From; b=AmJ6g1Mz2DNAhQBw3nVl8PQPmdGQHIWOgrdBCv9gF4NR8s6ABfpRE/AZxAIdoZvgS ltXZt1Ra2rhKiQGv8otCe7TCj0C5xCji7RipWwFISPZoTuAG1lEKHC1FDQAhiu/Cts Av9s2pvikRGMH1+3RjPsnKOjXry4ELKLkk+SIP8I= Message-ID: Date: Fri, 21 Jul 2023 13:59:40 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.13.0 Reply-To: jhg@acm.org Content-Language: en-US To: cygwin@cygwin.com From: Jim Garrison Subject: Most git executables are hard links to git.exe? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: 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: C:\Users\jim>fsutil hardlink list "c:\cygwin64\bin\git.exe" \cygwin64\usr\libexec\git-core\git-add.exe \cygwin64\bin\git-upload-archive.exe \cygwin64\bin\git-upload-pack.exe \cygwin64\bin\git.exe \cygwin64\bin\git-receive-pack.exe \cygwin64\usr\libexec\git-core\git-am.exe \cygwin64\usr\libexec\git-core\git-annotate.exe [snip] This is confirmed in a Cygwin bash session showing they all have the same inode number. jim@HOME10 /usr/libexec/git-core $ ls -il total 492832 34621422135881770 -rwxr-xr-x 142 jim None 3474451 Dec 12 2022 git.exe 34621422135881770 -rwxr-xr-x 142 jim None 3474451 Dec 12 2022 git-add.exe 34621422135881770 -rwxr-xr-x 142 jim None 3474451 Dec 12 2022 git-am.exe 34621422135881770 -rwxr-xr-x 142 jim None 3474451 Dec 12 2022 git-annotate.exe 34621422135881770 -rwxr-xr-x 142 jim None 3474451 Dec 12 2022 git-apply.exe [snip] This causes other Windoze programs not aware of hard links (such as even Windows Explorer :-( and Retrospect backup) to treat them as actual files. In the case of Retrospect (and I suspect most backup programs) this results in backing up 400MB instead of 3MB. I'm curious to know if there's a specific reason for this implementation that would make it the choice over symbolic links. -- Jim Garrison jhg@acm.org