-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed --convert-to-git-lfs command #158
base: main
Are you sure you want to change the base?
Fixed --convert-to-git-lfs command #158
Conversation
…d only in the root folder. Previously it created in all folders with lfs files. 2) Generating .gitattributes file. All file extensions written in a new line. Before: '*.{zip,mp4} filter=lfs diff=lfs merge=lfs -text.' After: '*.zip filter=lfs diff=lfs merge=lfs -text NEWLINE *.mp4 filter=lfs diff=-lfs merge=lfs -text'
… of the file .gitattributes in all directories with lfs files
I think this will work for the example, but not for other valid patterns. E.g., I have some things specified with extension wildcards, and other things specified explicitly, so I'm trying to run it like:
Obviously I don't want it to remove all the occurrences of '*.' and then add one to the front of everything. |
This may work better (haven't tested) at least for my particular case:
Anything before a '{' is the prefix, anything after a '}' is the postfix, and everything in between is assumed to be a comma-separated list. I think if it's not using this syntax it should just spit out what you put in, but that might not work since in that case the whole string should be in prefix. This should be close though. |
@dakotahawkins Thank you! Your fix really works. But there is a problem. Correctly handled only this particular case: |
…xt3}' and '{*.ext1,*.ext2,filename.ext3}'
Were you able to see what it does if you call it without the brace syntax? Like:
There may need to be a check that if |
Yes, I test it.I checked --convert-to-git-lfs: |
is this fixed or abandonned ? |
Good question ) Need to check, 4 years have passed and I have not used this tool anymore |
Before:
*.{zip,mp4} filter=lfs diff=lfs merge=lfs -text
After:
*.zip filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=-lfs merge=lfs -text