git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5 6/7] git-p4: add support for large file systems

From
Lars Schneider <larsxschneider@gmail.com>
Date
Sep 20, 2015, 21:26 UTC
Message-ID
<107A7A4A-1B2C-4280-A66E-A4B3BED13AE0@gmail.com>
In-Reply-To
<xmqqzj0ms85n.fsf@gitster.mtv.corp.google.com>
On 16 Sep 2015, at 17:20, Junio C Hamano <gitster@pobox.com> wrote:
Show 24 quoted lines
> Lars Schneider <larsxschneider@gmail.com> writes:
> 
>>>> +git-p4.largeFileSystem::
>>>> +	Specify the system that is used for large (binary) files. Please note
>>>> +	that large file systems do not support the 'git p4 submit' command.
>>> 
>>> Why is that? Is it just that you haven't implemented support, or
>>> is it fundamentally impossible?
>> 
>> If we detect LFS files only by file extension then we could make
>> it work. But then we must not use any git-p4 settings. We would
>> need to rely only on the “.gitattributes” file that is stored in
>> the P4 repository. My implementation also looks at the file size
>> and decides on a individual file basis if a file is stored in
>> LFS. That means all clients need the same file size threshold.
>> 
>> Junio explained the problem in the v4 thread:
>>> ...
> 
> Hmm, I am not sure if Luke's question was answered with the above,
> and I do not think I explained anything, either.  I did point out
> that with _your_ code I didn't see how "submit" would not work, but
> that is quite different from the problem being fundamentally not
> solvable.
OK, to answer Luke’s question after some thoughts: I think it is possible but I haven’t implemented it.

I see one issue right away: Some large file systems depend on gitattributes filters (e.g. Git-LFS). Git-p4 would need to run the filters on clone/sync/submit. Right now this does not happen and the user sees the raw LFS pointer files in the Git repository instead of the content after the initial git-p4 clone (the Git-LFS test cases shows this). This is no problem for a git-p4 one time usage as you usually upload the created Git repo to some Git server. Nevertheless, I was not able to find a quick and easy way to fix this. Anyone an idea?

If we get these filters working then we could create a new large file system similar to “Git-LFS”. Instead of pointing to large files on a “Git-LFS” server we could point right to their P4 location. That would be pretty neat.
- Lars
Previous: Junio C HamanoNext: larsxschneider@gmail.com
Message 13 of 14 in “git-p4: add support for large file systems”
  1. 0/7 git-p4: add support for large file systemslarsxschneider@gmail.com, Sep 14, 2015
  2. 1/7 git-p4: add optional type specifier to gitConfig readerlarsxschneider@gmail.com, Sep 14, 2015
  3. Luke DiamandSep 15, 2015
  4. 2/7 git-p4: add gitConfigInt readerlarsxschneider@gmail.com, Sep 14, 2015
  5. 3/7 git-p4: return an empty list if a list config has no valueslarsxschneider@gmail.com, Sep 14, 2015
  6. 4/7 git-p4: add file streaming progress in verbose modelarsxschneider@gmail.com, Sep 14, 2015
  7. 5/7 git-p4: check free space during streaminglarsxschneider@gmail.com, Sep 14, 2015
  8. 6/7 git-p4: add support for large file systemslarsxschneider@gmail.com, Sep 14, 2015
  9. Luke DiamandSep 16, 2015
  10. Lars SchneiderSep 16, 2015
  11. Eric SunshineSep 16, 2015
  12. Junio C HamanoSep 16, 2015
  13. Lars SchneiderSep 20, 2015
  14. 7/7 git-p4: add Git LFS backend for large file systemlarsxschneider@gmail.com, Sep 14, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.