I am trying to convert a Perforce(p4) repository to git (preferably to Helix4Git, a git server implementation by perforce).
I reduce my problem to a simple use-case in order to find the solution for my bigger problem.
In P4 I have one file //depot/foo.txt which is 10MB. I "cloned" it by using the merge command of P4 so I have the same file twice in my repository, called //depot/bar.txt.
//depot .. foo.txt (10MB) [internal-id==> 4509b9a8.txt] .. bar.txt (10MB, clone of foo.txt) [internal-id==> 4509b9a8.txt]
The P4 server stores the file once by using two links internally to reduce used disk space so just 10MB are used. On a local disk I would have two physical copies though (10+10=20MB). Now here is problem:
I use git-p4 to convert my P4 repository to git. First I clone it to my local computer, and then set a git-remote and submit everything to finally have it on my git server.
As mentioned earlier, I have 20MB on my local disk and when I submit it to my git server he uses 20MB as well.
1) If I clone a file in git, is it physically cloned on the server as well?
2) Is there any chance that git-p4 or the git server detects this "clone" - that it is the same file - and uses links internally as well? Either the git server itself or by using a file system feature (soft-link or hard-link, etc).
Extra Question) Would macOS APFS for the git server be of any help here?
Thanks a lot!