delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/07/21/17:52:26

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF6AF3851C20
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1689976344;
bh=38CaoOf18zLUHEn20b7avy/hGqHWLzCQ+UZz5ZVZ7EU=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=Dtr9g7seNxPkQWGcIa5y2lT/oQ9YDJAB+9ALtAQbo/O0643lq8kN9j2G2i8Q+gk4R
7fRgGrhfzPa5QMwxs5kE5QMZipzlXjtfJvafLjKVdOw7zpLCLFyWVNte+9Cu0Jawd6
H77qnU/jG35ghNm5mAEo7/RCrhwPQB4WE+FA4vW0=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 78EDC3855587
X-Authority-Analysis: v=2.4 cv=J8G5USrS c=1 sm=1 tr=0 ts=64bafe05
a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17
a=IkcTkHD0fZMA:10 a=V1JcC2m73iLE1JSLwyYA:9 a=QEXdDO2ut3YA:10
Message-ID: <ba2c0efe-7892-6eb3-9828-ca8d83643939@Shaw.ca>
Date: Fri, 21 Jul 2023 15:52:04 -0600
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Subject: Re: Most git executables are hard links to git.exe?
To: cygwin AT cygwin DOT com
References: <a243a980-66ba-e01e-298a-60a221efd7b4 AT jhmg DOT net>
Organization: Inglis
In-Reply-To: <a243a980-66ba-e01e-298a-60a221efd7b4@jhmg.net>
X-CMAE-Envelope: MS4xfNkJKlOki95mPsogwficrkFOte/WL3HnGTEtOLxbhgUsd0oGOVUy9wmFbFoavmGDEL7u4j7lho7KMftbvzrRsG4qalqPTx1PtmluWcUhMZOF/YnnhG56
U7UCrG8m/Vx+1L2a9WWuj7c7z37zwcjG6N829XdlvnQsVJpaLaglpECh9mHKPencQr71L1VoV+U4RFXIL48QIyvCQiuq5el4mCyTVneQjUrDe7MBG9WeKEOk
X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, BODY_8BITS,
DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A,
RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, 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 <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Brian Inglis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Brian Inglis <Brian DOT Inglis AT Shaw DOT ca>, Jim Garrison <jhg AT jhmg DOT net>,
jhg AT acm DOT org
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 36LLqQqD023082

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:
> 
>      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.

For the same reason you are complaining about backups not taking hardlinks into 
account: to avoid distributing 400MB instead of 3MB.

Cygwin backup utilities should be able to deal with these e.g. rsync -H, 
--hard-links, although it appears xcopy and robocopy may not under Windows 10; 
don't know about other utilities or Windows 11.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry


-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019