Skip to content

Conversation

chrisd8088
Copy link
Member

We add checks to the git lfs dedup command and its -t test option variant which cause the command to exit immediately with an explanatory message if any Git LFS extensions are configured.

This is because extensions normally cause the LFS storage object files to be altered in some way (for example, by compressing them), and so the object storage files can not be used as one-to-one copy-on-write clones (via filesystem reflinks) in the working tree, or else users would see unexpected file contents.

Fixes #4043.
/cc @swisspol as reporter

The dedup command should not proceed if any Git LFS
extensions are configured, because these typically
will change the contents of the file (e.g., by
compression) which is written to the local LFS object
storage tree from what the user expects to see in
their working tree, and so the working tree files
should not be cloned (via filesystem reflinks) from
the object storage files.
We note in our docs for the dedup command that it will refuse
to de-duplicate the working tree if any Git LFS extensions
are configured, as these have likely caused the object
storage files to differ from what the user expects in their
working tree (e.g., by compression).
Add tests for both the bare and -t flavours of "git lfs dedup"
to confirm that having any registered Git LFS extensions cause
the command to exit with the expected warning message.
@chrisd8088 chrisd8088 marked this pull request as ready for review February 28, 2020 20:30
@chrisd8088 chrisd8088 requested a review from a team February 29, 2020 05:06
@chrisd8088 chrisd8088 merged commit 11285f7 into master Mar 3, 2020
@chrisd8088 chrisd8088 deleted the chrisd/dedup-ext-exit branch March 3, 2020 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

git lfs dedup does not handle LFS extensions
2 participants