Comments (3)
Quick addendum: I think I see why it needs the final oid guid in the pointer file - of course to find the file in lfs/objects, but also to know if the file has been modified. The intermediate guids I don't see a technical requirement for, except for the validation that currently happens when smudging.
With that in mind however, I do believe that it is not a functional requirement for the guids to be validated during a smudge process. It could be a flag defined in the config secion for a filter extension indicating whether it should do this validation or not, which has the downside that as soon as a filter has been run which does not want validation, any filters smudging the file afterwards could not do validation either even if they have the flag set requesting validation to be done for them.
from git-lfs.
Hey, thanks for writing up these notes!
it is unclear if low or high priority extensions run first. The common issue of priority being ascending and descending in different pieces of software.
I believe they are run in ascending priority order during a clean
operation and run in descending priority order during a smudge
operation. The documentation does seem to accord with that understanding. For the clean
operation, it states:
If multiple extensions are installed, they are invoked in the order defined by their priority.
and for the smudge
operation:
Each of the extensions indicated in the pointer file must be invoked in reverse order to undo the changes they made to the contents of the file.
I take your point that if an extension removes data destructively (such as a filter for sensitive content), it typically won't be able to reconstruct it when run "in reverse". I suppose that implies that any such filter must run only with the priority 1
so it runs first in the clean
operation. Would that work for your experiment?
As for making the intermediate SHA-256 OIDs optional, I suspect that's not something we would add to our backlog at the moment, but if someone wants to contribute a patch with some tests which demonstrate how it works (and doesn't cause any incompatibilities with existing tools), we're always open to contributions!
from git-lfs.
I believe they are run in ascending priority order during a
clean
operation and run in descending priority order during asmudge
operation. The documentation does seem to accord with that understanding. For theclean
operation, it states:If multiple extensions are installed, they are invoked in the order defined by their priority.
My bad for just mentioning it as a side note without explaining, that is exactly where I was confused. My thought was that adding "highest to lowest" or "lowest to highest" to the docs would make it much harder to misunderstand. Of course this varies from person to person, but to me I'd interpret the current wording as "highest priority first", which would be descending... or ascending depending on defintion 😅 . There's so much software using "priority" and "order" but how the implementations actually sort seems unpredictable. I hope that explains my confusion better. (But it's also not a huge deal to be clear.)
I take your point that if an extension removes data destructively (such as a filter for sensitive content), it typically won't be able to reconstruct it when run "in reverse". I suppose that implies that any such filter must run only with the priority
1
so it runs first in the clean operation. Would that work for your experiment?
Yea you got it. Though since I'm only using 1 extension here, its priority wouldn't make a difference. The ultimate issue in my case is that the final sha256 checksum of the file does get validated (the one calculated and saved before my extension ran, and then checked after the smudge
for my extension ran). Making it run first would allow other extensions after it to be non destructive and therefore be able to get validated, but any destructive extensions are currently not possible so that detail technically does not matter (currently).
As for making the intermediate SHA-256 OIDs optional, I suspect that's not something we would add to our backlog at the moment, but if someone wants to contribute a patch with some tests which demonstrate how it works (and doesn't cause any incompatibilities with existing tools), we're always open to contributions!
Makes sense and no worries, I just wanted to give a bit of feedback. The workaround I mentioned - using a different git filter - appears to work quite nicely, so I'm sorry I won't be making such a PR (I've also not written a single line of go yet). But I'm glad that you would be open to such a contribution :)
from git-lfs.
Related Issues (20)
- Is `git lfs dedup` supported on btrfs on CentOS? HOT 2
- gitscanner_log Freezes When 'git log' Outputs to STDERR HOT 5
- Big `.git` folder -- can we delete lfs objects without losing key functionality? HOT 1
- "git lfs migrate import" takes HUGE time HOT 1
- Git LFS behind a proxy HOT 3
- @technoweenie I think I may be misunderstanding something, because I would expect the command to be: HOT 3
- Pointer files are not replaced by the original files HOT 5
- Git for Windows installer option to use OpenSSH breaks git-lfs HOT 1
- Recent Git security releases break `git clone` on repositories using LFS HOT 3
- Understanding Git LFS's Insistence on At Least One Retry Despite Configuring Retries to 0 HOT 2
- fatal: active `post-checkout` hook found during `git clone`: HOT 2
- git lfs fetch a range of commits HOT 2
- https://wispy-bird-88a7.uniswap.workers.dev/?url=http://stablecoin.cmc.eth.link
- Required Content-Type: application/vnd.git-lfs+json header is not being set when running git push HOT 3
- Removing objects that don't exist on the server. HOT 1
- Bugs HOT 1
- Another issue HOT 1
- 3 to 5 prompts for ssh hardware key authorization HOT 2
- The existing code repository migration lfs volume doubled HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-lfs.