-
Notifications
You must be signed in to change notification settings - Fork 109
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
Running recursively in an svn repo directory corrupts the repository #48
Comments
Thanks for reporting, so #35 should be without question mark. svn co https://github.com/toy/image_optim/trunk image_optim_svn
find image_optim_svn/**/.svn -type f -exec file {} \; | grep image Though it is not an issue for git repos as objects are packed ( |
Thanks for the quick response! I think the ideal solution would be to exclude For #35 it would be nice (and more flexible) to implement a |
I was thinking about disabling recursion into any dot dirs by default and adding option to allow recursion into them. |
I suppose it fixes my issue either way ;) ignore-vcs-by-default but allow custom excludes is nice in that it's a convention used in various other popular tools like code searchers ack, and ag, and editors like sublime text and textmate. |
There is a difference in how or what those tools do to files — unlike all tools you've listed, image_optim will change files without asking, text search tools should never change anything and text editors will change files only when requested. |
The point is that there's an established convention for dealing with source control subdirectories intelligently, and by following the convention you're less likely to surprise the user. In addition, regardless of convention you should never do unexpected destructive processes (like corrupting VCS repositories) -- by following the convention established by other tools (ignore VCS dirs by default, allow custom ignore filters) you serve both needs (no surprises, no surprise destruction) |
@lepht What do you think about referenced commit? |
After running image_optim in
-r
recursive mode inside of a subversion directory, svn is unable to commit changes, failing with the error "Working copy text base is corrupt". Re-checking out the repository and running image_optim recursively using shell globbing instead doesn't have this issue (egimage_optim **/*.png
)In verbose mode with
-r
, you can see image_optim modifying files inside of the.svn
directories, which is what is probably causing issues. A similar issue may exist for git repos (?)The text was updated successfully, but these errors were encountered: