-
Notifications
You must be signed in to change notification settings - Fork 452
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
Commit empty files as regular and warn user #1180
Conversation
The documentation is not available anymore as the PR was closed or merged. |
Codecov ReportBase: 83.93% // Head: 84.02% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1180 +/- ##
==========================================
+ Coverage 83.93% 84.02% +0.09%
==========================================
Files 43 43
Lines 4282 4288 +6
==========================================
+ Hits 3594 3603 +9
+ Misses 688 685 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Thanks, this is great!
if not path.endswith(".gitkeep"): | ||
warnings.warn( | ||
f"About to commit an empty file: '{path}'. Are you sure this is" | ||
" intended ?" |
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.
*"intended?" (no space)
for addition in additions: | ||
if addition.upload_info.size == 0: | ||
path = addition.path_in_repo | ||
if not path.endswith(".gitkeep"): |
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.
maybe extend to all filenames that start with a dot?
(nit) i dont think it's that uncommon to have empty files
Resolve #946.
With this PR:
skops
anymore - except if you want a more detailed message).gitkeep
files (legit use case)(cc @SBrandeis who created in issue)