From: Junio C Hamano <gitster@pobox.com>
To: Matthew McClain <mmcclain@noprivs.com>
Cc: git@vger.kernel.org, sandals@crustytoothpaste.net
Subject: Re: [PATCH v2] git-p4 shouldn't attempt to store symlinks in LFS
Date: Thu, 19 Oct 2023 10:59:25 -0700 [thread overview]
Message-ID: <xmqqzg0ewl1e.fsf@gitster.g> (raw)
In-Reply-To: <20231019002558.867830-1-mmcclain@noprivs.com> (Matthew McClain's message of "Wed, 18 Oct 2023 19:25:58 -0500")
Matthew McClain <mmcclain@noprivs.com> writes:
> git-p4.py would attempt to put a symlink in LFS if its file extension
> matched git-p4.largeFileExtensions.
>
> Git LFS doesn't store symlinks because smudge/clean filters don't handle
> symlinks. They never get passed to the filter process nor the
> smudge/clean filters, nor could that occur without a change to the
> protocol or command-line interface. Unless Git learned how to send them
> to the filters, Git LFS would have a hard time using them in any useful
> way.
>
> Git LFS's goal is to move large files out of the repository history, and
> symlinks are functionally limited to 4 KiB or a similar size on most
> systems.
Reads much better and easier to reason about.
Will queue and see if "git p4" stakeholders object for a few days;
if nothing happens, let's merge it down to 'next' and then to
'master' as usual.
Thanks.
> Signed-off-by: Matthew McClain <mmcclain@noprivs.com>
> ---
> git-p4.py | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/git-p4.py b/git-p4.py
> index d26a980e5a..0eb3bb4c47 100755
> --- a/git-p4.py
> +++ b/git-p4.py
> @@ -1522,6 +1522,10 @@ def processContent(self, git_mode, relPath, contents):
> file is stored in the large file system and handles all necessary
> steps.
> """
> + # symlinks aren't processed by smudge/clean filters
> + if git_mode == "120000":
> + return (git_mode, contents)
> +
> if self.exceedsLargeFileThreshold(relPath, contents) or self.hasLargeFileExtension(relPath):
> contentTempFile = self.generateTempFile(contents)
> pointer_git_mode, contents, localLargeFile = self.generatePointer(contentTempFile)
prev parent reply other threads:[~2023-10-19 17:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 18:58 [PATCH] git-p4 shouldn't attempt to store symlinks in LFS Matthew McClain
2023-10-18 19:30 ` Junio C Hamano
2023-10-18 22:26 ` brian m. carlson
2023-10-18 22:46 ` Junio C Hamano
2023-10-19 0:25 ` [PATCH v2] " Matthew McClain
2023-10-19 17:59 ` Junio C Hamano [this message]
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=xmqqzg0ewl1e.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mmcclain@noprivs.com \
--cc=sandals@crustytoothpaste.net \
/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;
as well as URLs for NNTP newsgroup(s).