Skip to content
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

Breaks with E2Big if too many files are committed #146

Merged
merged 1 commit into from
Oct 3, 2014

Conversation

mpapis
Copy link
Collaborator

@mpapis mpapis commented Sep 13, 2014

To reproduce, commit some k files (7.100 in my case)

@mpapis
Copy link
Collaborator

mpapis commented Apr 25, 2014

can you show us the full error message?

@robertjung
Copy link
Author

Just a long list of files and ERRNO:: E2Big at the end. Known behaviour when using ARGS + ENV > getconf ARG_MAX (262144 in my case).

On a somewhat related note, files containing spaces also break:

touch foo\ bar
git add foo\ bar
git commit -m "foo"
/Users/jung/.gem/ruby/1.9.3/gems/pre-commit-0.16.0/lib/pre-commit/utils/staged_files.rb:8:in `size': No such file or directory - foo (Errno::ENOENT)
from /Users/jung/.gem/ruby/1.9.3/gems/pre-commit-0.16.0/lib/pre-commit/utils/staged_files.rb:8:in `block in staged_files'
from /Users/jung/.gem/ruby/1.9.3/gems/pre-commit-0.16.0/lib/pre-commit/utils/staged_files.rb:8:in `reject'
from /Users/jung/.gem/ruby/1.9.3/gems/pre-commit-0.16.0/lib/pre-commit/utils/staged_files.rb:8:in `staged_files'
from /Users/jung/.gem/ruby/1.9.3/gems/pre-commit-0.16.0/lib/pre-commit/runner.rb:38:in `block in execute'
from /Users/jung/.gem/ruby/1.9.3/gems/pre-commit-0.16.0/lib/pre-commit/runner.rb:38:in `map'
from /Users/jung/.gem/ruby/1.9.3/gems/pre-commit-0.16.0/lib/pre-commit/runner.rb:38:in `execute'
from /Users/jung/.gem/ruby/1.9.3/gems/pre-commit-0.16.0/lib/pre-commit/runner.rb:26:in `run_single'
from /Users/jung/.gem/ruby/1.9.3/gems/pre-commit-0.16.0/lib/pre-commit/runner.rb:21:in `run'
from /Users/jung/.gem/ruby/1.9.3/gems/pre-commit-0.16.0/lib/pre-commit.rb:21:in `run'
from -e:11:in `<main>'

@mpapis mpapis removed the need info label Jun 11, 2014
@mpapis
Copy link
Collaborator

mpapis commented Sep 4, 2014

spaces fixed, as for to many files we will look later into it

@mpapis
Copy link
Collaborator

mpapis commented Sep 13, 2014

this should do it,
@jish did I miss anything else that could cause this problem?
@robertjung any chance you could test it?

@mpapis mpapis self-assigned this Sep 13, 2014
@mpapis mpapis mentioned this pull request Sep 13, 2014
@jish
Copy link
Owner

jish commented Sep 23, 2014

Seems like it'll fix the problem, @robertjung does it work for you?

mpapis added a commit that referenced this pull request Oct 3, 2014
Breaks with E2Big if too many files are committed
@mpapis mpapis merged commit 36f7d42 into master Oct 3, 2014
mpapis added a commit that referenced this pull request Oct 3, 2014
…pdated after #146 and #181

Conflicts:
	lib/pre-commit/checks/grep.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants