-
Notifications
You must be signed in to change notification settings - Fork 571
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
Raise issue if trying to upload .git/
folder + ignore .git/
folder in upload_folder
#1408
Conversation
The documentation is not available anymore as the PR was closed or merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm no expert on the inner workings on hfh
, but the parts I understand in this PR look great to me. I just left a turbo nit :)
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, LGTM! Thanks for the PR @Wauplin
Thanks for the reviews @lewtun @LysandreJik! It'll avoid mistakes in the future :) |
Fix #1401 and #1402 (thanks @lewtun for reporting it).
This PR:
CommitOperationAdd
andCommitOperationDelete
=> it is not possible to upload/delete a file in the.git/
folder. Server would not accept it anyway but let's raise an issue early..git/
folder when uploading withupload_folder
One thing that would be cool before having a
huggingface-cli push
command would be to comply with the.gitignore
specification. However this is not straightforward (cannot be converted to a list of allow_patterns/ignore_patterns that easily). I have found a gitignore_parser that does the trick but it would add another dependency for which I don't know much about the quality of it. Let's keep this discussion for later.Note: I also refactored a few tests in
hf_api
to be more consistent with creating/deleting repos. Not exhaustive but it's still cleaner.