From: Junio C Hamano <gitster@pobox.com>
To: "Vlad Petric via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Vlad Petric <vlad@drpetric.com>
Subject: Re: [PATCH] copy: prefer reflinks for file copies
Date: Tue, 11 Aug 2026 08:27:33 -0700 [thread overview]
Message-ID: <xmqqtsp03cey.fsf@gitster.g> (raw)
In-Reply-To: <pull.2380.git.git.1786460606222.gitgitgadget@gmail.com> (Vlad Petric via GitGitGadget's message of "Tue, 11 Aug 2026 15:03:26 +0000")
"Vlad Petric via GitGitGadget" <gitgitgadget@gmail.com> writes:
> For local clones, try a reflink before the existing hardlink path. The
> resulting order is therefore:
>
> - reflink;
> - hardlink, unless --no-hardlinks was requested;
> - byte-for-byte copy.
If copy-on-write works in situations where hard links are not
available, using it as a fallback might make sense. However,
we are talking about object files that are immutable. You have
no reason to update them to trigger copy-on-write at all. The
only changes you would make in the destination directories in
the new repository's '.git/objects/' are removal or creation,
never modification. Therefore, I do not understand why anyone
would want to use the above order. Could you elaborate?
Thanks.
next prev parent reply other threads:[~2026-08-11 15:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 15:03 [PATCH] copy: prefer reflinks for file copies Vlad Petric via GitGitGadget
2026-08-11 15:27 ` Junio C Hamano [this message]
2026-08-11 18:31 ` Vlad Petric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqtsp03cey.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=vlad@drpetric.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox