You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use clonefile system call on Mac OS X for faster & efficient object file copy #3740
If we use it. Copy from object store to working tree don't need additional space.
Of course, user can modify working tree files without any concern, it makes clonefile differ from symlink/hardlink.
Thanks for writing in. I agree this would be a nice change to have, but I'm not sure it's possible to achieve, and here's why.
Git LFS doesn't actually write files to the disk itself unless you use git lfs checkout manually. Normally, Git runs a smudge or clean filter, and invokes Git LFS through a piped context. As a result, Git LFS doesn't get the opportunity to decide how to write files; Git does that instead. Because the smudge and clean mechanism isn't intended for what Git LFS is using it for, I'm not sure if upstream would be willing to accept a patch to change things.
I'll leave this open as a possibility of a new feature that could be implemented and mark it as an enhancement.
I just noticed we cant touch actual file in woking tree during filter process. Thank you.
But I have another idea.
Creating new sub commamd like git lfs dedup(de-duplication) is possible. New command process lfs-nized file in working tree, delete each files and replace it with cloned one from lfs storage.
This is not ideal solution but saves disk usage also.
I think such a feature is interesting, but it wouldn't work on all platforms, since most of the platforms we support don't have copy-on-write features, and we can't use hardlinks. I'm not opposed to seeing a pull request that implements support for this, provided we do something sane on file systems where it isn't supported.
Thank you for your feedback.
Let's me try thinking and creating PR. I try to support XFS and Btrfs users also.
Background:
Where are many asset-heavy repository in game development. (As you know)
Typical working tree size is over 100GiB and we have to checkout 10~100 times on CI environment.
(per branch x per job name)
And each developers have local 2~5 checkout in their local environment.
If we can de-dup those working-tree files and object file into one, it is not difficult when case of git new-workdir is used or lfs.storage is set, I think users very happy.
Activity
bk2204 commentedon Jul 29, 2019
Hey,
Thanks for writing in. I agree this would be a nice change to have, but I'm not sure it's possible to achieve, and here's why.
Git LFS doesn't actually write files to the disk itself unless you use
git lfs checkoutmanually. Normally, Git runs a smudge or clean filter, and invokes Git LFS through a piped context. As a result, Git LFS doesn't get the opportunity to decide how to write files; Git does that instead. Because the smudge and clean mechanism isn't intended for what Git LFS is using it for, I'm not sure if upstream would be willing to accept a patch to change things.I'll leave this open as a possibility of a new feature that could be implemented and mark it as an enhancement.
kazuki-ma commentedon Jul 29, 2019
Aha, you are right.
I just noticed we cant touch actual file in woking tree during filter process. Thank you.
But I have another idea.
Creating new sub commamd like
git lfs dedup(de-duplication) is possible. New command process lfs-nized file in working tree, delete each files and replace it with cloned one from lfs storage.This is not ideal solution but saves disk usage also.
bk2204 commentedon Jul 29, 2019
Hey,
I think such a feature is interesting, but it wouldn't work on all platforms, since most of the platforms we support don't have copy-on-write features, and we can't use hardlinks. I'm not opposed to seeing a pull request that implements support for this, provided we do something sane on file systems where it isn't supported.
kazuki-ma commentedon Jul 30, 2019
Thank you for your feedback.
Let's me try thinking and creating PR. I try to support XFS and Btrfs users also.
Background:
Where are many asset-heavy repository in game development. (As you know)
Typical working tree size is over 100GiB and we have to checkout 10~100 times on CI environment.
(per branch x per job name)
And each developers have local 2~5 checkout in their local environment.
If we can de-dup those working-tree files and object file into one, it is not difficult when case of
git new-workdiris used orlfs.storageis set, I think users very happy.Add new command `git lfs dedup` for file system level de-duplication.
Add new command `git lfs dedup` for file system level de-duplication.
Add new command `git lfs dedup` for file system level de-duplication.
Add new command `git lfs dedup` for file system level de-duplication.
Add new command `git lfs dedup` for file system level de-duplication.
Add new command `git lfs dedup` for file system level de-duplication.
Add new command `git lfs dedup` for file system level deduplication.
Add new command `git lfs dedup` for file system level deduplication.
Add new command `git lfs dedup` for file system level deduplication.
Add new command `git lfs dedup` for file system level deduplication.