X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D68AD3860762 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1689973219; bh=26BOMRVghiGLHE5tvQmqfv4//Ps8CfcS4qSob/oBEV4=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=M0vorNksuqZ5I2fSn9SZU/BNaWPhypv4lqs5SAyr5ntl8PCZBD7povuyEstEZs1pv iwQOoGSfjxT7sEtKkjTPPPrQGVl3zHiiaOwMhGMZmNsMNHFKANfErSAYlaFjOx2vni icFuKYrnxgCk4Zngc61WMzGLabwi5QnRIg0TICXA= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 927FD3853D10 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 Content-Language: en-US To: cygwin AT cygwin DOT com Subject: Most git executables are hard links to git.exe? 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 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Jim Garrison via Cygwin Reply-To: jhg AT acm DOT org Cc: Jim Garrison Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Cygwin" 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 AT 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 AT acm DOT org -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple